필터 지우기
필터 지우기

Enter symbolic multivariable equalities in matlab

조회 수: 2 (최근 30일)
Roy Veldhuizen
Roy Veldhuizen 2012년 10월 18일
Hi everybody,
I'm trying to implement a symbolic equality but instead of define a variable, I need to define a group of variables. My equation is like this : theta^2*ue^b/nu=a*int(ue^(b-1),x0,x) The problem is that matlab does not allow me to have multiple variables on the left hand side of the = sign. Ofcourse I can rewrite it to a theta = ... but I need to represent my answer in the form of theta^2*ue^b/nu. I tried defining an equation like this eq1= ' theta^2*ue^b/nu=a*int(ue^(b-1),x0,x)' but then it just defines it as a string, and I lose arithmetic possibilities (such as a substitution which i need to perform)
I know Matlab 2012b has the == function for the symbolic toolbox, but I'm running 2011a. Does anyone know a way to this?
Thanks in advance for your time.
Roy

답변 (1개)

Azzi Abdelmalek
Azzi Abdelmalek 2012년 10월 18일
syms theta nu a ue b x0 x
equation=theta^2*ue^b/nu-a*int(ue^(b-1),x0,x)
  댓글 수: 2
Roy Veldhuizen
Roy Veldhuizen 2012년 10월 18일
This works for some purposes, but you do lose some functionality. If both the left hand and right hand side contain the same variable, you should be able to remove them using matlab simplify. For example ue in this case. However, since you've equated them to 'equation', matlab will not remove the ue's (unless you manage to convey that equation is equal to zero.)
Azzi Abdelmalek
Azzi Abdelmalek 2012년 10월 18일
편집: Azzi Abdelmalek 2012년 10월 18일
this équation is by default equal to zero
solve(equation) is the same then solve(equation==0)

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

카테고리

Help CenterFile Exchange에서 Matrices and Arrays에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by