how to write this equation in matlab? L and q are variable

1 回表示 (過去 30 日間)
Abdollah Sedaghat
Abdollah Sedaghat 2018 年 8 月 14 日
コメント済み: Abdollah Sedaghat 2018 年 8 月 15 日

回答 (1 件)

Matthew Cribb
Matthew Cribb 2018 年 8 月 15 日
編集済み: Matthew Cribb 2018 年 8 月 15 日
%The format of the equations should be correct. Af for plotting and evaluating the integral, I am not correct (I didn't get it to work) but hopefully this is a start. If you have questions about integrating within Matlab, type "help integrate" into the command window. (Also try "help fplot" etc).
Check out the attached document for more info on function handles.
%Define constants (for example)
del=2; delta = 3; alpha=4; L=5; q_c = 10;
%Create the function inside the integral:
f =@(q) q.^del.*coth(q)/((del+q.^del.*L.^del)/(del.*alpha)).^(del+alpha)
f_integral = integral(f,0,q_c)
%The Left Hand Side (LHS) vs RHS:
%F = E/E_0
F = del+delta.^del.*L.^del.*f_integral %RHS
Let me know if this helps.

カテゴリ

Help Center および File ExchangeProgramming についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by