필터 지우기
필터 지우기

Can I do this?

조회 수: 1 (최근 30일)
Will
Will 2012년 2월 8일
편집: Cedric 2013년 10월 4일
I'm tying to limit the length of an equation by doing this.
Al = @(x) 25.5e3+(300*x(1))+(x(1))^2;
Aj = @(x) (tan((2*pi)/9))*((x(1))^2+(100*x(1))+50);
Ak = @(x) (1000*(200*x(1))*(x(1))^2)/(2*tan((2*pi)/9));
func = @(x) x(3)*(47e3-Al+Aj+Ak);
What am I doing wrong?
I've read the guides on function handles etc, but I just cant understand it! I don't think I'm meant to be a programmer but I have to do this unfortunately.
Thanks in advance

채택된 답변

Kevin Holst
Kevin Holst 2012년 2월 8일
It looks like this is all that's wrong:
func = @(x) x(3)*(47e3-Al(x)+Aj(x)+Ak(x));
I'm assuming x is a 3 value vector?
  댓글 수: 1
Will
Will 2012년 2월 8일
Correct. Thank you. sorry for the stupid questions!

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Workspace Variables and MAT-Files에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by