Filter löschen
Filter löschen

How to read a single column for specific data?

1 Ansicht (letzte 30 Tage)
Ara
Ara am 31 Dez. 2012
Hi,
How can I read this column just for specific data?
x=[1;2;3;4;5;6;7;8;9;10];
I just want to read 1,2,3 and 9, 10 and calculate some formula just for these data.
Could you please guide me how?

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 31 Dez. 2012
How do you know which data you want to "read"? Is it the 1st, 2nd, 3rd, 9th and 10th positions? If so then
x([1 2 3 9 10])
  5 Kommentare
Walter Roberson
Walter Roberson am 31 Dez. 2012
data(data(:,1) < 10 | data(:,1) >= 22, :)
Ara
Ara am 31 Dez. 2012
Thank you, walter. Happy New Year!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Get Started with MATLAB finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by