Dimension error in matrix manipulation
Afficher commentaires plus anciens
Hi!!
I have a B matrix made of variables. It supposed to give me just one value per row (23 rows), but instead is giving me 230 rows, and off course it is not matching the dimensions of my A matrix. I cannot find the error in the script. Here is my Bmatrix:
%Define B Matrix BMAT=[-qsunN-hout*Tamb-hskyN*Tsky-(Pbrick*Cpbrick*(Lbriw/2)*(1/deltat));%B1
-(Pins*Cpins*(Linsw/2)*(1/deltat))-(Pbrick*Cpbrick*(Linsw/2)*(1/deltat));%B2
-(Pins*Cpins*(Linsw/2)*(1/deltat))-(Pgyps*Cpgyps*(Lgypw/2)*(1/deltat));%B3
-(Pgyps*Cpgyps*(Lgypw/2)*(1/deltat));%B4
-qsunS-hout*Tamb-hskyS*Tsky-(Pbrick*Cpbrick*(Lbriw/2)*(1/deltat));%B5
-(Pins*Cpins*(Linsw/2)*(1/deltat))-(Pbrick*Cpbrick*(Linsw/2)*(1/deltat));%B6
-(Pins*Cpins*(Linsw/2)*(1/deltat))-(Pgyps*Cpgyps*(Lgypw/2)*(1/deltat));%B7
-(Pgyps*Cpgyps*(Lgypw/2)*(1/deltat));%B8
-qsunE-hout*Tamb-hskyE*Tsky-(Pbrick*Cpbrick*(Lbriw/2)*(1/deltat));%B9
-(Pins*Cpins*(Linsw/2)*(1/deltat))-(Pbrick*Cpbrick*(Linsw/2)*(1/deltat));%B10
-(Pins*Cpins*(Linsw/2)*(1/deltat))-(Pgyps*Cpgyps*(Lgypw/2)*(1/deltat));%B11
-(Pgyps*Cpgyps*(Lgypw/2)*(1/deltat));%B12
-qsunW-hout*Tamb-hskyW*Tsky-(Pbrick*Cpbrick*(Lbriw/2)*(1/deltat));%B13
-(Pins*Cpins*(Linsw/2)*(1/deltat))-(Pbrick*Cpbrick*(Linsw/2)*(1/deltat));%B14
-(Pins*Cpins*(Linsw/2)*(1/deltat))-(Pgyps*Cpgyps*(Lgypw/2)*(1/deltat));%B15
-(Pgyps*Cpgyps*(Lgypw/2)*(1/deltat));%B16
-qsunE-hout*Tamb-hskyE*Tsky-(Pglas*Cpglas*Lglas*(1/deltat));%B17
-qsunS-hout*Tamb-hskyS*Tsky-(Pglas*Cpglas*Lglas*(1/deltat));%B18
-qsunW-hout*Tamb-hskyW*Tsky-(Pglas*Cpglas*Lglas*(1/deltat));%B19
-qsunR-hout*Tamb-hsky*Tsky-(Pcon*Cpcon*(Lcon/2)*(1/deltat));%B20
-(Pgyps*Cpgyps*(Lgypw/2)*(1/deltat))-(Pcon*Cpcon*(Lcon/2)*(1/deltat));%B21
-(Pgyps*Cpgyps*(Lgypw/2)*(1/deltat));%B22
-qsunE-qsunS-qsunW-qach-qin]%B23
fprintf('BMAT')
DATA=xlswrite('Data 3',BMAT)
Thanks!
Réponse acceptée
Plus de réponses (1)
Margarita
le 19 Oct 2014
0 votes
Catégories
En savoir plus sur Creating and Concatenating Matrices dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!