??? 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
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개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!