Skip to main content

Posts

How can I make the mean of 3d matrices in a cell in Matlab?

  I have a 1x12 cell in Matlab and each element of this cell has a 3d matrix. I want to make the mean of these 3d matrices, so that I obtain a 3d matrix that has the same dimensions of each one of the 3d matrices of the cell and that is the mean of the 12 3d matrices. How can I do this operation ? I tried to extract each cell and create a 4d matrix so that I could do  mean(fourdmatrix,4)  . However, it seems not possible to create a 4d matrix. Ideed, a code like this:   cell={threedmatrixA, threedmatrixB, ...} fourdmatrix=[]; for i=1:12 fourdmatrix(i)=cell{i}; end does not work. How can I do it ?     NOTE:- Matlabsolutions.com  provide latest  MatLab Homework Help, MatLab Assignment Help  ,  Finance Assignment Help  for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research. On
Recent posts

The input dimension of self-attention

MATLAB currently provides self-attention that can only input one sequence, but how to deal with two-dimensional images, for example, I want to input two-dimensional images composed of two sequences     NOTE:- Matlabsolutions.com  provide latest  MatLab Homework Help, MatLab Assignment Help  ,  Finance Assignment Help  for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research. Hi, If you want to apply self-attention to two-dimensional images composed of two sequences, you can reshape the image into a single sequence and then apply the self-attention mechanism. Here's a general approach to accomplish this in MATLAB: Convert the two-dimensional images into sequences: If your two-dimensional images consist of two sequences, you can reshape each image into a single sequence. For

How can I get rid of the large invisible border of my MATLAB figure without cropping it?

  Hey I have a question that would be super helpful to have an answer to. I am generating many MATLAB images. However, each image, when I copy figure to PPT, seems to have a large invisible box around it, which you can see when you click on the image. I know you can easily crop this out, but I don't want to crop many many images, and have to worry if the cropping is the same size. I want to copy these images into a Word document, and all the extra white space is not favorable. Is there a way to get that invisible box to just "hug" the image, instead of extending out several inches?     NOTE:- Matlabsolutions.com  provide latest  MatLab Homework Help, MatLab Assignment Help  ,  Finance Assignment Help  for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research. Try T

How To Plot Transfer Functions In Matlab?

  How can I plot this state space like the graph I attached by using tf() and step() command? Thank you!   I2/E0=1/(s^3+s^2+3*s+1)         NOTE:- Matlabsolutions.com  provide latest  MatLab Homework Help, MatLab Assignment Help  ,  Finance Assignment Help  for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research. Try these codes below please;   clc; clear; close all; numerator = 1; denominator = [1,1,3,1]; sys = tf(numerator,denominator); yyaxis left SEE COMPLETE ANSWER CLICK THE LINK https://www.matlabsolutions.com/resources/how-to-plot-transfer-functions-in-matlab-.php

How Can Replacing Characters In A String?

  I want to replace characters in a string using loops and if statements. For example if there is a Y in the string, I want to change it to a J. If there is an M in the string I want to change it to a Q.       NOTE:- Matlabsolutions.com  provide latest  MatLab Homework Help, MatLab Assignment Help  ,  Finance Assignment Help  for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research. One example(use  regexprep) : s="Yao Ming"; regexprep(s,{'Y','M'},{'J','Q'})   SEE COMPLETE ANSWER CLICK THE LINK https://www.matlabsolutions.com/resources/how-can-replacing-characters-in-a-string-.php

How to plot multiple graphs in one figure ?

  I have two codes. Each code has four graphs. I want to plot two graphs in one figure. For example: Dead nodes vs Round graph of two should be in one figure. In the same way other graphs also. I tried hold on function but still not getting. How to merge the two codes in order to get the graphs ? Code 1: clc clear all; close all; xm=100; ym=100; x=0; y=0; sink.x=0.5*xm; %location of sink on x-axis sink.y=0.9*ym; %location of sink on y-axis n=100 %nodes P=0.1 ; %probability of cluster heads Eo=0.5; %initial energy ETX=50*0.000000001; %tx energy ERX=50*0.000000001; %rx energy Efs=10*0.000000000001; %free space loss Emp=0.0013*0.000000000001; %multi path loss %Data Aggregation Energy EDA=5*0.000000001; %compression energy a=1; %fraction of energy enhancment of advance nodes rmax=3000 %maximum number of rounds do=sqrt(Efs/Emp); %distance do is measured Et=0; %variable just use below A=0; for i=1:1:n S(i).xd=rand(1,1)*xm; %generates a random no. use to randomly distibut

I keep getting error using plot not enough input arguments

  I keep getting error when I try to plot the following code and I don't really know what I'm doing wrong.   data = readtable('instr_04_01.csv'); load = data.Extension(2:89); displacement = data.Load(2:89); figure plot(load, displacement) the error I keep getting is; Error using plot Not enough input arguments.       NOTE:- Matlabsolutions.com  provide latest  MatLab Homework Help, MatLab Assignment Help  ,  Finance Assignment Help  for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research. You aren't extracting the numbers correctly. Also load is expecting arguments and you're giving it an equal sign instead of a filename. DO NOT USE A BUILT-IN FUNCTION FOR YOUR VARIABLE NAME.   Try this:   filename = 'instr_04_01.csv' data = readtabl