Clear Filters
Clear Filters

Info

This question is closed. Reopen it to edit or answer.

Don't know how to fix

1 view (last 30 days)
Boss Man
Boss Man on 24 Dec 2019
Closed: MATLAB Answer Bot on 20 Aug 2021
outdoorapr = xlsread('outdoorapr.xlsx','D2:D8586');
indoorapr=xlsread('indoorapr.xlsx','D2:D8586');
time=xlsread('time.xlsx','C2:C8586')
a=(outdoorapr);
b=(indoorapr);
t=time;
dt=diff(a)/5;
c=dt./(b(1:end-1)-a(1:end-1));%diff(a) will be one less than matrix a and b
plot(t,c);
when computing the time, i receive an empty matrix, attached are the files used, range for each of them is mentioned above. the graph produced doesnt have the time on the x axis and produces a strange curve. dont know where ive gone wrong
  2 Comments
Walter Roberson
Walter Roberson on 24 Dec 2019
column C in time.xlsx is a macro; the actual times are stored in column B . That might make a difference in the reading.
I recommend that you switch to readtable() instead of xlsread() .
Which MATLAB release are you using?
Boss Man
Boss Man on 25 Dec 2019
Most recent 19b

Answers (0)

This question is closed.

Community Treasure Hunt

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

Start Hunting!