How to make a graph from each row of data?
Show older comments
I need to make graphs for each row imported from an excel spread sheet. I have made a graph for the first row from my tables, using E(1) for example for the first set of data. I have attached the excel spreadsheet also for your reference.
[data, titles, r]=xlsread('Tidal Sites.xlsx');
A=data(:,9);
B=data(:,10);
C=data(:,11);
D=data(:,12);
E=data(:,6);
F=titles(:,2);
x1=linspace(E(1)/24., 7.3826475+(0.527331964/2)+(E(1)/24), 10000);
y1=det(A(1))*((exp(1).^(det(-B(1)).*x1))).*cos((det(C(1)).*x1)+det(D(1)));
figure, plot(x1,y1), hold on
x2 = x1(end) + cumsum(fliplr(diff(x1)));
y2 = fliplr(y1(1:end-1));
x3 = x2(end) + cumsum(fliplr(diff(x2)));
y3 = fliplr(y2(1:end-1));
x4 = x3(end) + cumsum(fliplr(diff(x3)));
y4 = fliplr(y3(1:end-1));
plot(x1, y1, x2, y2, x3, y3, x4, y4), hold on
title(F(1+1))
xlabel('Time (days)')
ylabel('Free-stream velocity (m/s)')
Accepted Answer
More Answers (0)
Categories
Find more on Spreadsheets in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!