Why is my functions not plotting a line?
이전 댓글 표시
My equations is working since i can manually change the variable to obtain different Vbar and Abar values, but it can't plot my graph. I have done this before so i dont know why its not working now. I attached the m' file and is also posting a screen shot.

채택된 답변
추가 답변 (1개)
Setsuna Yuuki.
2020년 12월 2일
편집: Setsuna Yuuki.
2020년 12월 2일
you need add one point
Wab=9.42;
d=0.12;
s=0.1; % 0.3, 0.6 & 0.9
theta=0:0.1:6.28
Wcd=(s.*Wab.*(s+sin(theta)))./(1+s.^2+2.*s.*sin(theta)); %add point before /
Vbar=Wcd.*d
Acd=(Wab.^2.*s.*cos(theta).*(1-s.^2))/((1+s.^2+2.*s.*sin(theta)).^2);
Abar=Acd.*d
plot(theta,Vbar), grid on;
xlabel('theta(rad)'), ylabel('Acceleration of bar CD(rad/s^2)')
title('Acceleration vs theta @ s=0.1')
카테고리
도움말 센터 및 File Exchange에서 Networks에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!