Matlab program to plot y(t) graph
30 ビュー (過去 30 日間)
古いコメントを表示
- Program to plot the given function y(t) and then to plot y(t+4),2y(t+4) , y(2t), y(2t-3) , y(t/2).
回答 (3 件)
Setsuna Yuuki.
2020 年 11 月 30 日
If you function is y(t), and you iterate this function in the time, your can plot it:
time = 0:0.01:1;
y = sin(time) %Your y(t). Can be anything function.
plot(time,y)
0 件のコメント
Ali Imran
2021 年 9 月 11 日
編集済み: Walter Roberson
2021 年 9 月 11 日
Function y=2x(t)
y=t^2;
Error program
1 件のコメント
Walter Roberson
2021 年 9 月 11 日
MATLAB is case sensitive for the keywords, so you need to use function instead of Function
MATLAB function names have the same rules as MATLAB variable names.
MATLAB variable names must start with an english letter A through Z or a through z. After that they may have those letters, or the digits 0 to 9, or underscore ('_') . -- so start with letter, but after that can be letters, numbers, underscore. The maximum variable length is 64 characters.
You tried to use a name 2x which starts with a number.
参考
カテゴリ
Help Center および File Exchange で Get Started with MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!