Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
I would like to check the code that I did for solving ordinary differential equation using "dsolve" function
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi All
I would like to check the code that I did is correct for solving ordinary differential equation by using "dsolve" function, the equation is: u*(dc/dx)-Ws*dc/dz-kc*(d2c/dz2)=0 % dc/dx , u, Ws, and kc are known any help will be so appreciated
Riyadh
This is the code:
for i=1:3
for j=1:12
syms C(z);
ode =diff(C,z,2)==u_014(i,j)*dc_dx_ws1(i,j)/Kc(i,j)-Ws1*diff(C,z)/Kc(i,j);
Dc = diff(C,z);
%Conditions
CC(i,1)=TSS_014_ws1(i,1);
Dc_c(i,1)=abs((TSS_014_ws1(i,2)-TSS_014_ws1(i,1))/0.5);
a1=CC(i,1);
a2=Dc_c(i,1);
cond = [C(1)==a1, Dc(1)==a2];
cSol(z) = dsolve(ode,cond);
Res(i,j)={cSol(z)}; % to make matrix of equations
end
end
% to solve the equations for z
for i=1:3 for j=1:12 syms f(z) f(z) = Res(i,j); z=ZF(i,j); f2(i,j)=f(z); doubleN(i,j) = double(f2(i,j)); end end
댓글 수: 0
답변 (0개)
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!