Reading from a file, MATLAB Programming

Reading from a File:

A file has been once created; it can be read into a matrix variable. When the file is a data file, the load function will read from the file filename.ext (example, the extension may be .dat) and generate a matrix with similar name as the file. For illustration, if the data file testfile.dat had been generated, this would read from it:

>> clear

>> load testfile.dat

>> who

Your variables are:

testfile

>> testfile

testfile =

Note: The load command works only if there are similar numbers of values in each line, so that the data can be stored in a matrix and the save command only writes from the matrix to a file. If this is not the situation, the lower-level file I/O functions should be used.

 

Posted Date: 10/18/2012 7:09:29 AM | Location : United States







Related Discussions:- Reading from a file, Assignment Help, Ask Question on Reading from a file, Get Answer, Expert's Help, Reading from a file Discussions

Write discussion on Reading from a file
Your posts are moderated
Related Questions
how to write the national log (ln(x)) in matlap ?

Create a function using mat lab to generate a sinusoidal signal. The parameters of the signal should have an Amplitude = 100, frequency = 100Hz, initial phase = 0, sample rate = 50

Calling a Function: Here is an illustration of the call to this function in which value returned is stored in the default variable ans: >> calcarea(4) ans = 50.2655


Creating Matrix Variables: Creating a matrix variable is actually just a generalization of creating a row and column vector variables. That is, the values within the row are s

I need assignment to finish.

i want matlab programming on johnson''s sequencing rule

Need help programming in Matlab for airy equations

I would like to ask if its possible to get help programing in matlab. If yes - how can I get help ?

a) Develop and submit a power-based MC "SNR" simulator (derived from the voltage-based SNR program provided in MS Powerpoint file) that: i) Uses the following Input: Time period