Error using + Matrix dimensions must agree
Ältere Kommentare anzeigen
Hello all! I keep on getting this error in my model:
Error using +
Matrix dimensions must agree.
It refers to this line:
parms = chol(results.cov+0.001*eye(size(parm)))'*randn(size(parm)) + parm;
I am not very experienced in MATLAB programming, can anybody see anything wrong?
Thank you,
Oana
Antworten (1)
Wayne King
am 18 Mär. 2013
You have to look at the size of results.cov and parm. Are they compatible for addition?
You can use
size(results.cov)
size(parm)
2 Kommentare
Oana
am 18 Mär. 2013
Walter Roberson
am 18 Mär. 2013
What result do you want? Do you want parm(K) added to each results.cov(K,:) or do you want it added to each results.cov(:,K) or do you want the results.cov to become 198 x 1 ?
Kategorien
Mehr zu Motor Drives finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!