- MATLAB is a case-sensitive language (that upper and lower case matters), so you must use upper-case "X" consistently, and "plot" is all lower case.
- The "^" (raise to the power) operator is for square matrices. To computer a per-element raise to the power, use ".^" instead.
How can i plot function 2^x ??
24 ビュー (過去 30 日間)
古いコメントを表示
Sorry im a beginner, but if I got
X=0:0.1:3
Y=2^x
Plot(X,Y)
Why wont matlab plot it? And how do I solve it? Thanks
0 件のコメント
採用された回答
Ken Atwell
2014 年 6 月 27 日
You've almost got it. Two things to fix:
X=0:0.1:3
Y=2.^X
plot(X,Y)
1 件のコメント
madhan ravi
2018 年 10 月 14 日
編集済み: madhan ravi
2018 年 10 月 14 日
Accepted by madhan ravi since the OP didn’t accept the answer
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!