필터 지우기
필터 지우기

matlab not plotting in for loop, plz help.

조회 수: 2 (최근 30일)
Tianju Huang
Tianju Huang 2016년 8월 8일
댓글: Stalin Samuel 2016년 8월 8일
for le = les:100:len
t=max(tf,tw);
if t <=16
f = 0.9*fy;
elseif 16 < t <= 35
f = 0.85*fy;
elseif 35 < t <= 50
f = 0.80*fy;
elseif 50 < t <= 100
f = 0.75*fy;
end
N1 = f*Ag;
wx = le/rx;
wy = le/ry;
w = max(wx,wy);
%fprintf('w = %5.6f\n',w);
Qxy = sqrt((fy/235));
%fprintf('Qxy = %5.6f\n',Qxy);
Wxy = round(w*Qxy);
%fprintf('Wxy = %5.6f\n',Wxy);
Py = mod(Wxy,10);
%fprintf('Py = %5.6f\n',Py);
Px = Wxy - Py;
%fprintf('Px = %3.0f\n',Px);
xx = Px/10+1;
%fprintf('xx = %3.0f\n',xx);
P = scn(xx,Py+2);
%fprintf('P = %5.3f\n',P);
N2 = N1*P*10^-3;
plot(le,N2);
end
I need to plot N2 vs le graph, im not getting any error code but the graph is just blank. not even a point.

채택된 답변

Stalin Samuel
Stalin Samuel 2016년 8월 8일
use the line specifications and marker size to identify the plotted points
plot(le,N2,'*k','Markersize',12)
  • If above command not solve your problem post the entire code/ missing values in the code already posted .So that somebody can trace the bug easily
  댓글 수: 2
Tianju Huang
Tianju Huang 2016년 8월 8일
Thank you so much, now all the dots are shown on the screen xD. Is there any way that i can join the dots together to form some sort of trend lines?
Stalin Samuel
Stalin Samuel 2016년 8월 8일
plot(le,N2,'*-k','Markersize',12)

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Annotations에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by