How can I extract one column from this matlab file?

1 回表示 (過去 30 日間)
Tony
Tony 2013 年 4 月 11 日
Dear All,
I have this matlab print as you can see below and I want to extract for example the column e ? How can I do that? I am new to matlab and I really appreciate your help. I tried many ways but I couldn't.
Thank you in advance for your assistance
  2 件のコメント
Leah
Leah 2013 年 4 月 11 日
We would need to know how the data is stored. Look at the workspace variables. It kind of looks like a dataset, but you said it was a print out? like on the command window?
Tony
Tony 2013 年 4 月 12 日
Leah, Thank you for your help. I was having confusion and I think I confused you too but I got it right. Mr Mahdi just modified my code slightly so I get the second column extracted.
I really appreciate your comment and your ability to solve my confusion.

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

採用された回答

Mahdi
Mahdi 2013 年 4 月 11 日
If I were to assume that the column e is the second column and the name of the matrix it's in is matrix1, then:
RequiredColumn=matrix1(1:end, 2);
As you can see, in the first part of matrix1, I ask MATLAB to recall all the rows; from first row to the last row. In the second part, I ask MATLAB to only extract data from the second column. (You might need to use matrix1(2:end,2).
  1 件のコメント
Tony
Tony 2013 年 4 月 12 日
Thanks Mahdi for the unique help.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCreating, Deleting, and Querying Graphics Objects についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by