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
Illustration of Modifying Elements: Illustration, the fifth element in the vector newvec is 9 >> newvec(5) ans = 9 The subset of a vector, that would be a vector it

Referring to and Modifying Elements: The particular element in a vector is accessed by using the name of the vector variable and the element number (or subscript, or index) in

how do I make a second main function?

Simulation of a transmission system with a 4-fsk modulation scheme; using non-coherent detection method and an awgn channel. System description: 1. Input: A. Random binary

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

Example of Variables and assignment statements: The expression is computed and then that value is stored in the variable. For illustration, this is the way it would appear in

Problem of a projectile being launched at an angle of O at an initial velocity ofv. The equations for the height hand horizontallocation x as functions of time t are as follo

Strings: The MATLAB also handles strings that are a sequence of characters in single quotes. For illustration, using the double function on a string will represent the equival


can i getting wirless programing in matlab