Azzera filtri
Azzera filtri

How to i extract data from my plot into excel?

3 visualizzazioni (ultimi 30 giorni)
Akash Menon
Akash Menon il 19 Ott 2018
Commentato: Akash Menon il 22 Ott 2018
Hi there community!
So I have a signal now that I've been struggling to figure out how to extract the data from the plot and save it to excel. I recently asked a question about how to plot 8640 data points across 86400 seconds. (there were 8640 measurements taken in a day and I had to plot it across the whole day). I need to now create a signal out of the plotted data to use on Simulink.
The signal that I extract from the plot must have 86400 y values and the x values must go from 0-86400 (with 1 second intervals). How do I go about doing this? I'm not an expert with matlab so if it could be dumbed down a bit that'd help. Or if there's a way to directly put it into the signal builder block in Simulink.
Thanks very much!
  2 Commenti
madhan ravi
madhan ravi il 19 Ott 2018
if you have the data in hand why would you extract from the plot??
Akash Menon
Akash Menon il 22 Ott 2018
I have 8640 datapoints but the range of measurement is 86400 seconds so I wanted to interpolate the values in-between.
%%Plotting the measured power signals
% Reading excel data
% Adjusting the x-axis vector (86400 datapoints)
%t = days(1);
% Plot 1
%%Interpolation of the 8640 datapoints over 86400 seconds
data2 = interp1(x1,mydata,x2);
%%Plot 2
Managed to do it so hope it helps others! (I used the data3 array stored in the workspace to move the data to excel then I imported that into Signal builder to build a signal out of it- the plots are only for representative purposes- the interpolated data is stored in 'data3' )

Accedi per commentare.

Risposte (0)




Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by