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
Write a Matlab function that computes y1= tan(x) and y2= sin(x)/cos(x), returns the difference |y1-y2| and prints a message whether the two are equal or not. Test your function for

The fuel consumption of a certain make of car may not be exactly that rated by the manufacturer. Suppose ten cars of the same model were tested for combined city and highway fuel c

We wish to numerically perform the following integration: (a) Use Matlab's quad function to perform the above integral. (b) Analytically evaluate the integral (e.g. do t

Use MATLAB and a method based on linear predictive coding for the restoration of a clipped voiced speech signal. My proposed algorithm is based on linear prediction where a reco

Build a single phase model for the simple 3-phase system shown in the single line diagram shown below using SimPowerSystems in MATLAB Simulink. Data: Source Voltage

to find given number is odd or even in an array with explanation and flow chart

Hi, I need help with solving five-1st order ODE which are coupled. I need to plot these as well. Could I please get a quote. Thanks

i need matlab code on 2 dimensional analysis of temperature distribution in steel using finite element method

#create a matlab GUI for designing common emitter amplifier which produces AC load lines based on the component values

It is desired to determine the DFT of the analogue signal x (t) = 25 cos(10 Πt)cos(400Πt). (a) Find the Nyquist rate of the signal.   (b) What is the record (signal) length i