Plot will not work

7 ビュー (過去 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 Center および File ExchangeAnnotations についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by