close allfor n=1:100 lammax = 4-2*cos(sqrt(n)*pi/(sqrt(n)+1)); lammin = 4-2*cos(pi/(sqrt(n)+1)); kappa = lammax/lammin;endplot(n, kappa, 'r--')xlabel('n')ylabel('Condition Number')
MATLAB: I’m trying to plot this for loop with the kappa values with respect to the increasing n but the plot that it shows is empty and the x axis is from 99 to 101 instead of 1 to 100 like the for loop dictates. Can anybody tell me what I’m doing wrong
for loopplotting
Best Answer