필터 지우기
필터 지우기

How would you write this equation in Matlab?

조회 수: 1 (최근 30일)
Carlos Puente
Carlos Puente 2023년 2월 26일
답변: Walter Roberson 2023년 2월 26일
This is a Heat Transfer Equation, but I'm not sure how to make it work in Matlab. I need to obtain at least 8 values from theta.

답변 (1개)

Walter Roberson
Walter Roberson 2023년 2월 26일
Pi = sym(pi);
syms L x y W
syms n integer
syms UpperBound
assume(n >= 1);
part1 = ((-1)^(n+1) + 1)/n;
part2 = sin(n*Pi*x/L);
part3 = sinh(n*Pi*y/L) / sinh(n*Pi*W/L);
theta(x,y) = 2/Pi * symsum(part1 * part2 * part3, n, 1, UpperBound)
theta(x, y) = 
%example
example = simplify(subs(theta, {L, W, UpperBound}, {10, 3, 15}), 'steps', 10)
example(x, y) = 
vpa(example, 5)
ans(x, y) = 

카테고리

Help CenterFile Exchange에서 Particle & Nuclear Physics에 대해 자세히 알아보기

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by