cut function and plot

22 Ansichten (letzte 30 Tage)
Josefina Ottitsch
Josefina Ottitsch am 20 Apr. 2019
Beantwortet: Cris LaPierre am 20 Apr. 2019
hello,
assuming I have the following code and I only want it to plot sin from the 10th value to the 20th value (there are 21 values), how do I do this?
x=0:.1:2
f=sin(x)
plot(f)
thank you for the support!

Antworten (1)

Cris LaPierre
Cris LaPierre am 20 Apr. 2019
plot(f(10:20))
If you would like to understand more, I highly recommend going through MATLAB Onramp. Chapter 5 address how to select subsets of your data.

Kategorien

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

Community Treasure Hunt

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

Start Hunting!

Translated by