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
Write a pseudo-code showing the list of steps to take for solving the given problem. In this process, you should identify the functions that are to be used in the program. Develop


Ft. Loudoun and Watts Bar are two large hydroelectric dams, the former upstream of the latter. The level of Watts Bar Lake must be kept within limits for recreational purposes, and

Example of Linear indexing: For illustration, the following substitutes the whole second row with values from a vector  The whole row or column could also be changed : >> m



Hello! How to cipher on Matlab the message consisting eight symbols. At first the message shares on blocks. Then in each of blocks shift of symbols is carried out. The initial text

The occurrence of bushfires in the Port Stephens area may be modelled by a Poisson process. The average occurrences of bushfires n is assumed to be either 15 (event A 1 ), 20 (even

Define a function: The radius of a circle is passed to the function to input argument  rad; the function computes the area of this circle and stores it in the output argument

cAN Can I learn Metlab .I am X Scientist in DigitalCommunication. Can U please help me.I know the programming concepts