Azzera filtri
Azzera filtri

how to construct this in matlab? can anyone explain step by step?

2 visualizzazioni (ultimi 30 giorni)
I am trying to construct this in matlab.

Risposte (1)

John D'Errico
John D'Errico il 19 Mar 2023
Modificato: John D'Errico il 19 Mar 2023
One line of code. The explanation is right there. If you want more depth, the read the doc for jacobian. The good thing is, MATLAB actually has documentation already written for its tools, as well as providing step by step examples. Its already written.
help jacobian
--- help for sym/jacobian --- JACOBIAN Jacobian matrix. JACOBIAN(f,x) computes the Jacobian of the scalar or vector f with respect to the vector x. The (i,j)-th entry of the result is df(i)/dx(j). Note that when f is scalar, the Jacobian of f is the gradient of f. Also, note that scalar x is allowed, although this is just DIFF(f,x). Example: syms x y z u v; jacobian([x*y*z; y; x+z],[x y z]) returns [y*z, x*z, x*y; 0, 1, 0; 1, 0, 1] jacobian(u*exp(v),[u;v]) returns [exp(v), u*exp(v)] See also SYM/CURL, SYM/DIFF, SYM/DIVERGENCE, SYM/GRADIENT, SYM/HESSIAN, SYM/POTENTIAL, CURL, DIVERGENCE, HESSIAN, LAPLACIAN, VECTORPOTENTIAL, SUBS. Documentation for sym/jacobian doc sym/jacobian
  2 Commenti
Arpita
Arpita il 19 Mar 2023
sorry, but this is not a function we are dealing with here, but arrays of values. there are separate df and dm values we need. this is why it's difficult to incorporate this particular command.
John D'Errico
John D'Errico il 19 Mar 2023
You cannot differentiate arrays of values. An array of values is just a list of numbers. You asked for explicit intructions, but then did not even provide sufficient information about what you wer doing.
I'm sorry, but you CANNOT differentiate a number. It is just a number. Well, you cam, but the derivative of a number is zero. It does not vary.

Accedi per commentare.

Categorie

Scopri di più su Operators and Elementary Operations 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!

Translated by