I am asking for help in plotting a line graph in my "for" loop program. The program is able to run the calculations but I am not able to graph. Below is the code i have created.
clc f=196.2; fi=0; finc= pi/180; ff=pi/4 for x=0:pi/180:pi/4; ac= (f*cos(x))/((sin(pi/6)*cos(x))+(cos(pi/6)*sin(x))) fprintf('Force of AC is %7.2f\n',ac) bc= ((ac*cos(pi/6))/cos(x)) fprintf('Force of BC is %7.2f\n',bc) end hold on; xx=x(1:length(x)); plot(xx,ac)
Best Answer