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
Relational Expressions: The Conditions in if statements use expressions which are theoretically, or logically, either true or false. These expressions are termed as relational

Problem: Consider a trapezoidal piece of polymer film as shown below. The parallel sides of the trapezoid are insulated and the temperature of the bottom and diagonal sides are f

Q.1: Consider the transmission of a sinusoid x(t) = cos(2f0t) through a channel a ected by multipath and Doppler. Let there be two paths, and assume the sinusoid is being sent fro

I want to write a function in matlab which gives me a population pyramid bar chart. could you please help me do this.

i want to save the values of a particular equation in a for loop.. for ex: for i=1:100 et=(x+yz); end thus how can i store the values of et at each iteration

Input in a for Loop: The script below repeats the process of prompting the user for a number, and echo printing the number (that means simply printing it back out). A for loop

what are data collect this topic,how i can create algorithm in mat lab what language support easy to this topic

Solve the optimality condition for each P equation against M according to the following relation: Condition for Optimality:         ∇ M = λ ∇ P      with respect to C and T.

Looping Statements: Consider the problem of computing the area of a circle with radius of 0.3 centimeters-a MATLAB program certainly is not required to do that; you would use

how to code this function