Getting a blank graph

1 回表示 (過去 30 日間)
aakaar jaiswal
aakaar jaiswal 2020 年 6 月 13 日
編集済み: Ameer Hamza 2020 年 6 月 13 日
My assignment is to graph the output angular velocity of a given universal joint. I have the equation and I am told to graph the function over the interval (0,2pi) or 0 to 360 degrees. I don't know why but my code is giving me a blank graph. Here's my code :
syms theta1 w1
grid on
theta1 = 0:pi/2:2*pi;
w2 = ((cos(pi/6)*(sec(theta1)).^2) / ((tan(theta1)).^2+(cos(pi/6)).^2))*2*pi;
plot(w2,theta1 ), xlabel('input angle'), ylabel('output velocity')

回答 (1 件)

Ameer Hamza
Ameer Hamza 2020 年 6 月 13 日
編集済み: Ameer Hamza 2020 年 6 月 13 日
grid on
theta1 = 0:pi/2:2*pi;
w2 = ((cos(pi/6)*(sec(theta1)).^2)./((tan(theta1)).^2+(cos(pi/6)).^2))*2*pi;
%^ use elementwise division operator
plot(w2,theta1 ), xlabel('input angle'), ylabel('output velocity')

カテゴリ

Help Center および File ExchangeGraph and Network Algorithms についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by