Defining column vectors for plotting from a single data source

5 ビュー (過去 30 日間)
Michael Moxley
Michael Moxley 2011 年 12 月 8 日
I'm very new to Matlab and I'm just trying to plot data in the simplest way by importing a spreadsheet of column vectors. When using the workspace GUI to plot the data matlab does not know what columns are X, Y, and Z for instance. How do I define them so I don't have to create a bunch of individual vectors.
Thanks,
Mike

採用された回答

Fangjun Jiang
Fangjun Jiang 2011 年 12 月 8 日
I don't know how to choose the column using workspace GUI for plotting, but it should be easy using MATLAB command.
A=magic(10);
figure; plot(A(:,3)); %plot the third column
figure; plot(A(:,1),A(:,5)); % plot using first column as X and 5th column as Y
  2 件のコメント
Michael Moxley
Michael Moxley 2011 年 12 月 8 日
A partial answer
Fangjun Jiang
Fangjun Jiang 2011 年 12 月 8 日
Okay, now I may be able to make the answer complete.
In workspace window, you need to double click the variable, 'A' in the above example. You'll then see a 10x10 grid like an Excel spread sheet. Then you can select a particular column and press the GUI plot button.

サインインしてコメントする。

その他の回答 (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