Subscripted assignment dimension mismatch error in valsx. How do I get rid of the error?
Mostrar comentarios más antiguos
for alpha=20:1:100; l =((k'*covinv)*mu - alpha)/((k'*covinv)*k); x= (1/alpha)*covinv*(mu-l*k); valsx(count,:)=x'; f(count)=0.5*alpha*(.....); count=count+1; end
Respuestas (1)
Roger Stafford
el 3 de Dic. de 2016
0 votos
It is impossible to be sure about the cause of your error because you haven’t defined the nature of your various variables. However I will speculate that the quantity x’ is a column vector and valsx(count,:) is expecting a row vector to be input. Or possibly x’ is a row vector of the wrong length.
Categorías
Más información sobre Loops and Conditional Statements en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!