MATLAB Answers

Plotting part of an array

105 views (last 30 days)
Jacob Huhtala
Jacob Huhtala on 29 Sep 2020
Commented: Jacob Huhtala on 29 Sep 2020
This is probably a super easy question to answer and im just blanking out. But im trying to plot this array, which is time in seconds, but i only want to plot it up to 0.2 seconds. Its being plotted agaisnt volts to make a sin curve. I've included the lines of code, and both arrays. Thank you for your help ahead of time.
plot(TimeT3_2048<0.2,VoltsT3_2048)
title('Task 3 2048 Volts v. Time')
xlabel('Time [Sec]')
ylabel('Volts [V]')

Answers (1)

Sindar
Sindar on 29 Sep 2020
simplest:
xlim([0 0.2])
  2 Comments

Sign in to comment.

Products


Release

R2018a

Community Treasure Hunt

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

Start Hunting!