Hello I have a problem, I tryed to derive a equation like "a1^2*a2^2" but I got "ans = 2*a1*a2^2", This result is correct but If we take as variable only "a1" but I need to take as varible "a1" and "a2". I want to get this becase is a multiplication:
I have used diff () this is my code:
what is the correct way to say matlab which are my variables?
Thank you very much I wait for your answer.