cut function and plot

조회 수: 17 (최근 30일)
Josefina Ottitsch
Josefina Ottitsch 2019년 4월 20일
답변: Cris LaPierre 2019년 4월 20일
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!

답변 (1개)

Cris LaPierre
Cris LaPierre 2019년 4월 20일
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.

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by