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

2 visualizzazioni (ultimi 30 giorni)
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 Commenti
Image Analyst
Image Analyst il 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.

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su Programming 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!

Translated by