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

조회 수: 2 (최근 30일)
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
Image Analyst
Image Analyst 2014년 3월 2일
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.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Programming에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by