Hi,
I have tried the following:
syms p(n,m,b,d,t)
p(n,m,b,d,t)=((n-m)*((1/b)-(1/d)+ ((n-m)*t)/(n*b*d)))
I know the values of everything in this equation (including the total value of the p function) except n,. How do i get matlab to calculate what n is?
Thank you dearly in advance, Karen

 Akzeptierte Antwort

Jeff Miller
Jeff Miller am 22 Aug. 2018

1 Stimme

syms p n m b d t
eqn = p == ((n-m)*((1/b)-(1/d)+ ((n-m)*t)/(n*b*d)));
solve_for_n = solve(eqn,n)
% Specify your known values here
m = 3;
b = 2;
d = 1;
t = 2;
p = 12;
the_n_is = vpa(subs(solve_for_n))

1 Kommentar

Karen Lahav-Yacouel
Karen Lahav-Yacouel am 22 Aug. 2018
That s great. Thank you so much for your help! Def learned from your answer. Thank you!!!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Produkte

Version

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by