Load from file and plot data, MATLAB Programming

Example: Load from File and Plot Data:

As illustration, a file known as timetemp.dat stores two lines of data. The first line is the time of the day, and the next line is the recorded temperature at each of those times. The first value of 0 for the time presents midnight. For illustration, the contents of the file may be:

0  3  6  9 12 15 18 21

55.5 52.4 52.6 55.7 75.6 77.7 70.3 66.6

The script below loads the data from the file into a matrix known as the timetemp. It then separates the matrix into vectors for the time & temperature, and then plots the data by using black + symbols.

1476_Load from File and Plot Data.png

Running the script generates the plot seen in figure:

 

1645_Load from File and Plot Data1.png

Note that it is difficult to see the point at time 0 as it falls on the y-axis. The axis function can be used to change the axes from the defaults as shown 

Posted Date: 10/18/2012 7:11:37 AM | Location : United States







Related Discussions:- Load from file and plot data, Assignment Help, Ask Question on Load from file and plot data, Get Answer, Expert's Help, Load from file and plot data Discussions

Write discussion on Load from file and plot data
Your posts are moderated
Related Questions
IMAGE PROCESSING TECHNIQUES TO FIND THE HUMAN BLOOD GROUP

To accept two numbers from the user; Display all prime numbers between these two numbers.

To change a variable: To change a variable, the other assignment statement can be used that assigns the value of a different expression to it. Consider, for illustration, the

How to make EMG analysis by Matlab?


Expand a matrix: To expand a matrix, an individual element could not be added as that would mean there would no longer be the similar number of values in every row. Though,

#question.i want to know the number of pixels related to the actual phase value and want to separate the zero phase valued pixels from the image..

How to design a FIR filter using ANFIS in MATLAB

Produce a random real number: To produce a random real number in the range from low to high, at first create the variables low and high. And then, use the expression rand*(hig

For the signal with four harmonics (first to fourth) that can be obtained from the script, do the following: a)  Place the time domain signal for the case in which all the harmo