Find combinations of two variables in functions which must equal certain value
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Morten Hansen
il 5 Ago 2019
Risposto: John D'Errico
il 5 Ago 2019
Is it possible to plot a curve of all the combinations of q=sqrt(z1z2) if q must equal 9 for the interval 0<=z1<=40?
It should look something like this:
0 Commenti
Risposta accettata
John D'Errico
il 5 Ago 2019
Algebra? If we have
q = 9 = sqrt(z1*z2)
then it is trivial.
z1*z2 = 9^2
So the curve is given as
z2 = 81/z1
Plotting is equally trivial.
z1 = 0.25:.25:40;
plot(z1,81./z1,'-');
xlabel z1
ylabel z2
Of course, there are no solutions when z1==0.
Do you want MATLAB to do the thinking for you?
syms z1 z2
>> EQN = sqrt(z1*z2) == 9;
z2 = solve(EQN,z2)
z2 =
81/z1
z2fun = matlabFunction(z2)
z2fun =
function_handle with value:
@(z1)8.1e+1./z1
fplot(z2fun,[0.25,40])
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Number Theory in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!