MATLAB Answers

Alternative to rhs function

9 views (last 30 days)
Good dusk,
I have a symbolic equation and I want to assign the rhs of it to a variable (this rhs will be a number, but I do not know it a priori), but as I am using matlab R2016b I do not have the rhs function at my disposal.
var = rhs(eqn)
The above line is what I want to do.
What could be a way to do this in my current version?
Best regards.

  0 Comments

Sign in to comment.

Accepted Answer

Luiz Ricardo Almeida
Luiz Ricardo Almeida on 30 Jan 2020 at 15:56
Well, I found out a solution and it is quite embarassing telling what it is.
I just assigned the rhs of the equation to an auxiliary variable, and then I just did
var = auxiliary_var
It is not an alternative to rhs function, but solved my problem.
Sorry for being stupid.

  0 Comments

Sign in to comment.

More Answers (0)

Sign in to answer this question.