code wont match dimensions
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
a=[00.00 22.3
00.06 22.4
00.11 22.4
00.16 22.5
00.21 22.4
00.26 22.4
00.31 22.3
00.36 22.2
00.41 22.2
00.46 22.1
00.51 22
00.56 21.9];
b=[00.00 3.8
00.05 3.8
00.10 3.8
00.15 3.7
00.20 3.6
00.25 3.6
00.31 3.5
00.36 3.5
00.41 3.4
00.45 3.4
00.50 3.3
00.55 3.3];
%matrix a of indoor temp
%matrix b of outdoor temp
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(c);
I want to display the left hand side of the matrix on the x-axis, don't want it involved in the calculations of c and dt. how would i do that?
thanks for any help given
0 Commenti
Risposta accettata
David Hill
il 24 Dic 2019
dt=diff(a(:,2))/5;
c=dt./(b(2:end,2)-a(2:end,2));%diff(a) will be one less than matrix a and b
plot(a(2:end,1),c);
This should work for you.
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Graph and Network Algorithms in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!