Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Undefined operator '+' for input arguments of type 'function_handle'.

조회 수: 1 (최근 30일)
STP
STP 2019년 3월 29일
마감: MATLAB Answer Bot 2021년 8월 20일
t1 ...
t2a..
phi= pi./2;
k = -phi./(t2a(1)-t1(1));
U1 = (exp(1i*pi));
A1= V1 + U_in1 ; % this works ;
U2 = @(t) (exp(1i*(phi + k.*(t-t1(1)))));
A2 = V2a + @(t) U2(t) ; % how to correct this?
A =[A1; A2]
(t, A)

답변 (1개)

Adam
Adam 2019년 3월 29일
A2 = V2a + U2(t) ;
would be a function call. You only use the @(t) when defining a function handle, not when actually calling it.
  댓글 수: 2
STP
STP 2019년 3월 29일
Hi, thanks for your response, I tried that earlier; it triggers another error - Matrix dimensions must agree.
Adam
Adam 2019년 3월 29일
Well, that's a different matter entirely, but it is still the syntactically correct way to call the function.

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by