HOW TO PLOT THE INTERVAL OF t AND SIN
12 ビュー (過去 30 日間)
古いコメントを表示
plot the function s = 2 sin(3t+2) + √𝟓𝒕 + 𝟏 over the interval 0 ≤ t ≤ 5. Put a title on
the plot, and properly label the axes. The variable s represents speed in feet per second; the variable t
represents time in seconds
1 件のコメント
回答 (2 件)
Adam Danz
2021 年 2 月 15 日
編集済み: Adam Danz
2021 年 2 月 16 日
Here are the tools you'll need. These are basic Matlab 101 tools that you'll use a lot in Matlab.
- Define t using the colon opertator or linspace.
- Put t into your equation; you'll obvsiously need to insert some operators such as 2*sin(.......
- Use plot() to plot s as a function of t
- Use xlabel(), ylabel() to label the axes.
0 件のコメント
Hira
2023 年 3 月 14 日
X=0:t:5; S=2*sin(3*t+2)+sqrt(5*t+1); Plot(X,S),Xlable('X'),Slable('S')
1 件のコメント
Jan
2023 年 3 月 14 日
This suggestion will not work:
- 0:t:5 is not necessarily the complete interval. See:
t = 0.35;
X = 0:t:5;
X(end)
prefer X = linspace(0, 5, 100) instead.
- Matlab is case-sensitive: There is neither a "Plot" command, nor "Xlable" nor "Slable". You mean: plot, xlabel, ylabel.
参考
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!