Solve Equation with symbolic Constants numerically.

Say I have got the Planck's law whose maximum I want to determine numerically:
% a = hbar/(pi^2*c^3)
% b = hbar./(kB*T);
syms w a b positive real; u = a * w^3/(exp(b*w)-1);
du = diff(u,w);
How can I numerically solve du for w but leaving constants a and b?
I tried many solvers like
fzero(matlabFunction(du),w)
But all of these accept constants in the form of double inputs only.
Is there a way to get a result with Constants included? Like:
w = 2.82 * b % this is in fact the standard result.

 採用された回答

Torsten
Torsten 2023 年 6 月 8 日
編集済み: Torsten 2023 年 6 月 8 日

0 投票

syms w a b positive real
u = a * w^3/(exp(b*w)-1);
du = diff(u,w);
wsol = solve(du==0,w)
wsol = 

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeSymbolic Math Toolbox についてさらに検索

タグ

質問済み:

2023 年 6 月 8 日

編集済み:

2023 年 6 月 8 日

Community Treasure Hunt

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

Start Hunting!

Translated by