The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: import data in matlab
Replies: 3   Last Post: Apr 15, 2009 8:12 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Andrea Asoni

Posts: 10
Registered: 4/15/09
import data in matlab
Posted: Apr 15, 2009 6:26 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply


just started using matlab. I have the following problem. I think it is sort of standard but i couldn't figure out how to deal with it.

I have data in .txt format that look like

var1 var2 var3
1 . 3
2 6 4
2 3 5

I have about 141 vars and 90k obs. I'd like to drop the rows with missing values. I found i can use the command X(any(isnan(X),2),:) = [];.
In order to do that i have to import the data separating the name of the variable from the matrix (through the import wizard). Since different variables have more or less missing values i cannot do this importing them as separate vectors...

then i need to perform some calculations like newvar=f(var1, var2, var3)... How do I say to Matlab that var1 is actually the first column of the matrix, var2 the second and so on?


Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.