필터 지우기
필터 지우기

Insert this equation into a code

조회 수: 1 (최근 30일)
jonathan riley
jonathan riley 2020년 4월 14일
댓글: BN 2020년 4월 15일
  댓글 수: 2
jonathan riley
jonathan riley 2020년 4월 14일
notice (-0.04t) is an exponent of 'e'
jonathan riley
jonathan riley 2020년 4월 14일

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

답변 (2개)

Spectro
Spectro 2020년 4월 14일
It should be like this.
numerator = a*b;
denominator = pow2(b*cos(cos(t))) + pow2(a*cos(cos(t)));
r = (numerator/sqrt(denominator))*exp(-0.04*t);
For the calculation itself you have to declare a, b and t.
  댓글 수: 2
BN
BN 2020년 4월 14일
+1
jonathan riley
jonathan riley 2020년 4월 15일
it is telling me matrix dimensions must agree.
What is wrong?

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


BN
BN 2020년 4월 14일
Hi, I create it as a function:
function r = mifun(a,b,t)
%this function calculates r based on a and b and t as inputs
% Detailed explanation goes here
numerator = a*b;
first_part = (b*cos(cos(t)))^2;
second_part = (a*sin(sin(t)))^2;
denominator = first_part + second_part;
denominator = sqrt (denominator);
fraction = numerator/denominator;
r = fraction*exp(-0.04*t);
end
  댓글 수: 4
jonathan riley
jonathan riley 2020년 4월 15일
perfect thank you!
BN
BN 2020년 4월 15일
You are most welcome.

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

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by