Plot will not work

조회 수: 1 (최근 30일)
Joe Nichols
Joe Nichols 2016년 11월 29일
편집: Jan 2016년 11월 29일
Hello, I'm sure this will be a very simple question for someone to answer.
I'm attempting to plot a distance/time graph using data-sets however when I run my code it does not plot a graph. It plots the axis and assigns values, but there is no plot on the graph itself. What am I doing wrong?
My code:
X = [nums(1,2)]; % my dependent vector of interest
t = [nums(1,2)/nums1(1,2)]; % my independent vector
figure % create new figure
plot(t, X)
[EDITED, Jan, Please format your code using the "{} Code" button - Thanks]

채택된 답변

Alexandra Harkai
Alexandra Harkai 2016년 11월 29일
nums(1,2) is one particular element in your nums array, hence t will be 1, and you'll end up plotting a single point.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Line Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by