??? Error using ==> cvx.mtimes at 41 Inner matrix dimensions must agree. Error in ==> cvx.mrdivide at 15 z = mtimes( x, y, 'rdivide' );

2 vues (au cours des 30 derniers jours)
Nimmi
Nimmi le 1 Mar 2014
Commenté : Image Analyst le 2 Mar 2014
clear all i=1:201; k=201; t(i)=-3+6*(i-1)/(k-1); t=t(:); y(i)=exp(t(i)); y=y(:); p(i)=t(i).^2; p=p(:);
cvx_begin variables a0(1) a1(1) a2(1) b1(1) b2(1) F(k) minimize max (abs(F-y)) subject to F(i)==(a0+a1*t(i)+a2*p(i))/(1+b1*t(i)+b2*p(i)) 1+b1*t(i)+b2*p(i)>=0; F==F(:); cvx_end
??? Error using ==> cvx.mtimes at 41 Inner matrix dimensions must agree.
Error in ==> cvx.mrdivide at 15 z = mtimes( x, y, 'rdivide' );
PLEASE HELP ME TO FIND THE MISTAKE HERE
  2 commentaires
Image Analyst
Image Analyst le 2 Mar 2014
Exactly which line throws the error? And what do the functions "cvx_begin" and "cvx_end" do? And you need to learn how to use MATLAB. The first few lines of your code is the most complicated way to creating arrays I've ever seen. It's way too complicated and unnecessary if you just learn the language.

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Programming dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by