필터 지우기
필터 지우기

Is there any way to solve this integration with loop?

조회 수: 1 (최근 30일)
Bajdar Nouredine
Bajdar Nouredine 2021년 8월 19일
댓글: Bajdar Nouredine 2021년 8월 23일
r = 1:10
t= 1: 10

채택된 답변

Walter Roberson
Walter Roberson 2021년 8월 19일
Yes, you could replace the following symsum() with a loop that totaled over m
syms m t r positive
syms r__prime real
Pi = sym(pi)
Pi = 
π
V_r_t = symsum(exp(m*Pi*t)*sin(m*Pi*r)*int(r__prime*sin(m*Pi*r),r__prime,0,1),m,1,10)
V_r_t = 
  댓글 수: 4
Walter Roberson
Walter Roberson 2021년 8월 20일
syms m t r positive
syms r__prime real
Pi = sym(pi)
Pi = 
π
V_r_t = symsum(exp(m*Pi*t)*sin(m*Pi*r)*int(r__prime*sin(m*Pi*r),r__prime,0,1),m,1,10)
V_r_t = 
r_vec = 1:10;
t_vec = 1:10;
[R,T] = ndgrid(r_vec,t_vec);
V = subs(V_r_t, {r, t}, {R, T})
V = 
Reminder: sin(INTEGER*pi) is 0, and all of the terms of V_r_t have INTEGER*pi*r and all of your r are integer.

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

추가 답변 (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