How to convert the equation to MATLab code

조회 수: 159 (최근 30일)
ayad filemban
ayad filemban 2019년 4월 10일
답변: Essodokinam 2024년 1월 31일
Help converting

답변 (9개)

Thomas Rosin
Thomas Rosin 2019년 4월 10일
편집: Thomas Rosin 2019년 4월 10일

Walter Roberson
Walter Roberson 2020년 7월 19일
편집: Walter Roberson 2020년 7월 19일
  1. MATLAB has no implied multiplication. All multiplication must be explicit with either the .* (corresponding elements, which is usually the desired operation) or * (inner product) operators
  2. e to a power is coded as exp() the power
  3. division is the ./ operator with the / operator being more like multiplying by the pseudo-inverse
  4. powers other than e to something, should be the .^ (element at a time) or ^ (matrix power through generalized inner product) operators.
  5. square root is usually most clear and efficient using sqrt() but .^0.5 or nthroot() can be used, and sometimes sqrtm() or ^0.5 are appropriate
For the kinds of equations that are shown here, use .* and ./ and .^ instead of * and / and ^

akram mehenni
akram mehenni 2022년 2월 2일
𝐸5 = 𝛼. 𝐸3 . √𝐸4
  댓글 수: 1
Walter Roberson
Walter Roberson 2022년 2월 2일
The equations that were posted have no E3, E4, or E5, so this does not appear to be an answer to the question that was put. How are people to understand this as a solution to the question ?

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


Marwa Hameed
Marwa Hameed 2022년 8월 12일
편집: Walter Roberson 2022년 8월 15일
How can I convert
this equation to MATLAB ?
  댓글 수: 1
Walter Roberson
Walter Roberson 2022년 8월 15일
Caution: you have variable names Q_min and Q_max but you are integrating with respect to log(Q) so Q_min and Q_max are limits on log(Q) not limits on Q.
Integrating with respect to a function instead of a variable is always tricky.
Pi = sym(pi);
syms a_0 E G_fi(Q) Q_max Q_min R sigma_Born T log_Q
eqn = sigma_Born == 4*Pi*a_0^2/(T/R) * int(G_fi(exp(log_Q))/(E/R), log_Q, Q_min, Q_max)
eqn = 

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


Vishwajeet
Vishwajeet 2022년 11월 29일
how can i convert Cu dTu/ dt = F αTu − γ (Tu − Td) to matlab code?
  댓글 수: 1
Steven Lord
Steven Lord 2022년 11월 29일
See the documentation for the ODE solvers. I'd start with ode45 and the pages listed under Topics at the end of that page.

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


HA
HA 2023년 7월 22일
Please, your support is needed, thank you
  댓글 수: 4
Walter Roberson
Walter Roberson 2023년 7월 23일
would be
kummerU(1/2, 5/4, tau_0.^4 ./ (32 .* log(2).^2 .* sigma_k2.^2))
This might require the Symbolic Mathematics Toolbox
HA
HA 2023년 7월 23일
Thank you

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


Om prakash Meena
Om prakash Meena 2023년 9월 13일

BUI
BUI 2023년 11월 5일
Help me convert this fuction please
  댓글 수: 1
Walter Roberson
Walter Roberson 2023년 11월 5일
"A function can be recovered from its Fourier series, under suitable conditions. When this is possible, the Fourier series provides the inversion formula: "
and look at the formula there. Now let lambda = -1/P ...

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


Essodokinam
Essodokinam 2024년 1월 31일
Hi everybody, I need you help for converting these function in matlab:

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by