Hey everyone,
I have the following two calculations:
f = @(t) pi * sin(pi*t/4) - pi/2;
g = @(t) cos(t);
I simply want to multiply g with f:
@(t) pi * sin(pi*t/4) - pi/2 * cos(t)
Is there any possibility to do this?
I am using MATLAB R2020b.
Thanks in advance!

 채택된 답변

John D'Errico
John D'Errico 2020년 12월 5일

0 개 추천

h = @(t) g(t).*f(t);
The .* operator was used to make it vectorized.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Programming에 대해 자세히 알아보기

제품

릴리스

R2020b

질문:

2020년 12월 5일

댓글:

2020년 12월 5일

Community Treasure Hunt

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

Start Hunting!

Translated by