How to solve Implicit plot in analitic equation

Dear Friends,
Let implicit equation
r/(1-r)^((c+1)/(c-1))=A*exp(-z/(c-1))
with z=x-c*t, A, c, t is known and x in the form of a matrix
let x = [-50:dx:50]
How to plot (x,r)?
Please help me. Thanks.

 채택된 답변

Star Strider
Star Strider 2016년 6월 1일

0 개 추천

Try this:
syms A c r x z
A = sym(2); % Substitute Correct Values
c = sym(3); % Substitute Correct Values
t = sym(5); % Substitute Correct Values
Eqn1 = r/(1-r)^((c+1)/(c-1)) == A*exp(-z/(c-1));
z = x-c*t;
r = simplify(solve(subs(Eqn1), r), 'steps',10);
figure(1)
fplot(r, [-50 50])

댓글 수: 4

Star Strider thanks for your answer but still error. How? ??? Error using ==> sym.simplify Too many input arguments.
Error in ==> Analitik_1C2 at 7 r = simplify(solve(subs(Eqn1), r), 'steps',10);
My pleasure.
I am using R2016a. It ran without error.
Break them out into separate lines to see where the problem is:
Eqn2 = subs(Eqn1);
r = solve(Eqn2, r);
r = simplify(r, 'steps',10);
You may not need the simplify call. I use it routinely to make the expressions easier to read.
Alternatively, try:
r = simplify(r);
Kasam Syaepduin
Kasam Syaepduin 2016년 6월 1일
편집: Kasam Syaepduin 2016년 6월 1일
I am using R2010a
clear all;
clc;
syms A c r x z
A = sym(2);
c = sym(3);
t = sym(5);
z = x-c*t;
Eqn1 = r/(1-r)^((c+1)/(c-1)) == A*exp(-z/(c-1));
r = simplify(r);
fplot(r, [-50 50])
still error. Whether there are other alternatives?
If the error is in the simplify call, just delete it. The simplify call is not important to the code.

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Get Started with Symbolic Math Toolbox에 대해 자세히 알아보기

질문:

2016년 6월 1일

댓글:

2016년 6월 1일

Community Treasure Hunt

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

Start Hunting!

Translated by