Hi, how can i proceed with this question, everytime i plot it, it doesn't show me my line. Can u guys help me
1 回表示 (過去 30 日間)
古いコメントを表示
Roman Azrael Balgobin
2019 年 11 月 8 日
コメント済み: Roman Azrael Balgobin
2019 年 11 月 8 日
x = -10 : 0.01 : 10;
y = (exp(x)/ sin(x)) + 0.3;
plot(x,y)
0 件のコメント
採用された回答
Jan Studnicka
2019 年 11 月 8 日
You are missing . before /. See:
x = -10 : 0.01 : 10;
y = (exp(x)./ sin(x)) + 0.3; % use ./ instead of /
plot(x,y)
その他の回答 (1 件)
the cyclist
2019 年 11 月 8 日
編集済み: the cyclist
2019 年 11 月 8 日
It's because you used a matrix division instead of an element-wise division to calculate y. Try this instead:
y = (exp(x)./ sin(x)) + 0.3;
Note the use of ./ in place of just / in the formula.
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!