MATLAB: How to do a matrix like this? MATLABmatrix how to do a matrix like this in a loop,[1 2 3 … 10, 1 4 9 … 100 1 8 27… 100] Best Answer (1:10).^((1:3)')or on older MATLABbsxfun(@power,1:10,(1:3)') Related SolutionsMATLAB: How to plot something like this? https://www.mathworks.com/matlabcentral/answers/368029-how-to-sketch-the-following-signal-x-t-3u-t-10-4u-t-3-r-t-2-4r-t-2u-t-2-2r-t-3-2u-t-4#answer_292042 MATLAB: Can someone help me loop this? Rather than sweating out a vectorization, it's a lot easier to do it with a single for-loop. Also it may be just as fast or faster. n = 4; m = 21; std_t = zeros(m,size(pc,2)); for k = 1:m std_t(k,:) = std(pc(k:k+n-1,:)-repmat(MA(k,:),n,1),1); endThe rows of 'std_t' are your vectors std_t1, vtd_t2, etc. Make sure 'pc' is defined up to m+n-1 rows. Related QuestionHow can i plot Histogram for this?How to plot this?? “if, elseif, else”
Best Answer