필터 지우기
필터 지우기

use symsum for equation forming and solving

조회 수: 2 (최근 30일)
Arvind
Arvind 2023년 5월 10일
편집: Torsten 2023년 5월 10일
I want to make a equation to slolve for variable Kd and write a code
l is index as s & c
p & and Tiijj are function of r where r is define as r_s and r_c
syms alpha s b c phi
Eq = a-b== (c-b)*(3*a+4*b)*symsum(phi_l*Tiijj(alpha_l),l,s,c) eq(1)
a = solve(Eq,a)
  댓글 수: 2
Arvind
Arvind 2023년 5월 10일
i am confused with the expression in summation and use of symsum because Tiijj are function of Kma,Kd,K*,mu_d,mu_ma,mu* and alpha
and phi is function of alpha
alpha = [0.1 0.18 0.3];, Kma,K*,mu_ma,mu* all are constant value
and here calculate the value of Kd
Torsten
Torsten 2023년 5월 10일
편집: Torsten 2023년 5월 10일
Don't use "symsum" in the case of only two terms in the sum.
Just write something like
syms alpha T(alpha,a) phi(alpha) a b c d
alpha_s = 1;
alpha_c = 5;
phi(alpha) = alpha^2;
T(alpha,a) = alpha^4 + a^2;
eqn = a-b==1/3*(c-b)*(3*a+4*d)/(3*b+4*d)*(phi(alpha_s)*T(alpha_s,a)+phi(alpha_c)*T(alpha_c,a));
sol = solve(eqn,a,'MaxDegree',3)
sol = 

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

채택된 답변

Torsten
Torsten 2023년 5월 10일
The equation is linear in k_d.
So collect all terms containg k_d on the left hand side, all other terms on the right-hand side. Then factor out k_d and divide by the multiplicative factor.
  댓글 수: 1
Arvind
Arvind 2023년 5월 10일
this is simple method i know but i confused with summation part

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

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