How to get an equation for a desired variable from a three variable equation using MATLAB?

1 view (last 30 days)
clc; clear all;
syms x y u v psi
a = 0.5; b = -2; c = -1.5;
psi = a*x^3 + b*y + c*x % three variable equation
% In the above equation psi is dependent on x & y
% But I want to get an expression for y in terms of psi and x
% The solution should look like y = (psi - a*x^3 - c*x) / b

Accepted Answer

David Hill
David Hill on 11 Nov 2020
syms x y u v psi a b c;
eqn=psi == a*x^3 + b*y + c*x;
solve(eqn,y);

More Answers (0)

Categories

Find more on Symbolic Math Toolbox in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!