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
I am using the wavelet gui (wavemenu) to decompose some data. I need to be able to export the signals. This is not a problem using only "Wavelet 1D" where only one time series is b

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

Various commands for get the help: There are various commands which can serve as an introduction to MATLAB and allow you to get the help: info will show contact informatio

Plot way forms for the following modulation schemes using Mathlab: a)      2 ASK                     b)  BFSK                        c) BPSK 4 ASK

Characters and Encoding: A character in a MATLAB is represented by using single quotes (example, 'a' or 'x'). The quotes are essential to denote a character; without them, the

Illustration of Built-in functions and help: To find out what a specific function does and how to call it, type help and then the name of function. Illustration: >> help si

For a statistically stationary environment it would be advantageous to use gear shifting, that is to reduce the adaptation gain with time. To illustrate this, try using a varying a

1. Given these sinusoids: x 1 (t) = 0.5cos(25t+20°),   x 2 (t)=0.85cos(25t+160°) and   x 3 (t)= 0.81cos(25t-145°) (a)  Subplot the phasors X 1 , X 2 and X 3 corresponding t

I have an assignment to do by MATLAB : the assignment is to design Script that makes (Panorama Stitching) for multiple pictures .. for more information see the link : tobw.net/inde