HOW TO PLOT THE INTERVAL OF t AND SIN

10 Ansichten (letzte 30 Tage)
Laiba Javed
Laiba Javed am 15 Feb. 2021
Kommentiert: Jan am 14 Mär. 2023
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 Kommentar
Jan
Jan am 15 Feb. 2021
Bearbeitet: Jan am 15 Feb. 2021
How can we help you? What have you tried so far? What is your specific Matlab problem?

Melden Sie sich an, um zu kommentieren.

Antworten (2)

Adam Danz
Adam Danz am 15 Feb. 2021
Bearbeitet: Adam Danz am 16 Feb. 2021
Here are the tools you'll need. These are basic Matlab 101 tools that you'll use a lot in Matlab.
  1. Define t using the colon opertator or linspace.
  2. Put t into your equation; you'll obvsiously need to insert some operators such as 2*sin(.......
  3. Use plot() to plot s as a function of t
  4. Use xlabel(), ylabel() to label the axes.

Hira
Hira am 14 Mär. 2023
X=0:t:5; S=2*sin(3*t+2)+sqrt(5*t+1); Plot(X,S),Xlable('X'),Slable('S')
  1 Kommentar
Jan
Jan am 14 Mär. 2023
This suggestion will not work:
  • 0:t:5 is not necessarily the complete interval. See:
t = 0.35;
X = 0:t:5;
X(end)
ans = 4.9000
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.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu 2-D and 3-D Plots finden Sie in Help Center und File Exchange

Tags

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by