필터 지우기
필터 지우기

Solve Equation with symbolic Constants numerically.

조회 수: 1 (최근 30일)
Niklas Kurz
Niklas Kurz 2023년 6월 8일
편집: Torsten 2023년 6월 8일
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일
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개)

카테고리

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