MATLAB: Loop loops Hi I need to do two loops, where the inputs of both need to be 0.4:0.01:0.99, any help on how to achieve this buy by still going through the conventionally i=1: etc (as need this for output). Best Answer KVals = 0.4:0.01:0.99;for K = 1 : length(KVals) thisval = KVals(K); ...end Related SolutionsMATLAB: Storing for loop nested value in a vector f = zeros(4,4,4);for i=0:3 for ii=0:3 for iii=0:3 f(iii+1,ii+1,i+1) = (i/2) + (ii/3) + (iii/4); end endendf = f(:); MATLAB: Saving values in a for loop x = -10:0.1:10; f1 = trapmf(x,[-2 0 0 2]); kvals = 0.05:0.05:1; for kidx = 1 : length(kvals) k = kvals(kidx); index = find(abs(f1-k)<10^(-10)) Xidx(kidx) = x(index) end Related QuestionMatrix problem not getting desired result.Error while running a loop inside transfer functionStoring values in for loopWhat’s wrong with this code , the graphs appears empty
Best Answer