partial derivative and quotient rule and a product rule
조회 수: 6 (최근 30일)
이전 댓글 표시
hi all i have a partial derivative which needs to be programmed on matlab.
struggling atm. help would be grateful.
m=(-10.4a-1.2b+1.2ab+28.8)(9.2ab-9.2ab^2)/(16b-16b^2+(7.1-2.3a)*(9.2a-9.2ab)+32.66ab-10.58ba^2)
we need to differentiate m with respect to a and b and equal it to zero.
we want to find out a and b when the above mentioned scenario is equal to zero.
답변 (1개)
MICHAEL RILEY
2020년 3월 28일
편집: MICHAEL RILEY
2020년 3월 28일
Well the first issue you have, is that syntactically your code will not run. You are missing operators in your equation for matlab to run. I have expanded your equation, really more than I normally would, to show you the operators you are missing. Also for the ab^2 terms it is unclear if you are square both or not.
Secondly, you need to use the symbolic library to take the derivative with respect to a or b
syms a b
m = (-10.4 * a - 1.2 * b + 1.2 * a * b + 28.8) * (9.2 * a * b - 9.2 * a * b ^ 2) /...
(16 * b - 16 * b ^ 2 + (7.1 - 2.3 * a) * (9.2 * a - 9.2 * a * b) +...
32.66 * a * b - 10.58 * b * a ^ 2)
dm_da = diff(m, a)
dm_db = diff(m, b)
m =
m =
m =
댓글 수: 2
Khawla Albanna
2020년 3월 28일
Hi, I have a question how to download the symbolic library. Because I am getting an error with my codes while using syms.
Walter Roberson
2020년 3월 29일
Khawla Albanna is it possible that you are using R2019a on MacOS Catalina ? (I cannot remember if it applies to R2019b as well) ? If so then you should upgrade to at least R2019b Update 4.
참고 항목
카테고리
Help Center 및 File Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!