Simple Data Analysis with Spreadsheets
OBJECTIVE
- To export signal values as .csv file, read and display it
 
LEARNING OUTCOMES
- After the completion of this experiment students will be able to compute with exported data.
 
SOFTWARE USED: 
                 MATLAB® R2017a
1. Display cosine signal and export it as a .csv file. Read this .csv or .xls file as an array and plot it. Compute the mean and standard deviation of the signal. Plot its histogram with an appropriate bin size.
PROGRAM
t=-10:0.01:10;
s=cos(t);
csvwrite(sprintf('F:\\exp_7\\My_File%d.csv'),s)
M = csvread(sprintf('F:\\exp_7\\My_File%d.csv'))
figure;
plot(t,M);%plotting the read values
figure;
h = histogram(M);
title('histogram plot')
Avg= mean(M)
std_deviation=std(M)
OUTPUT
Avg = -0.0548
std_deviation =0.7212


Comments
Post a Comment