How to find partial derivation for y with respect to x given y has a size of 3 by 300 and x has a size of 2 by 3?
6 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
x=rand(2,3);
y=rand(3,300);
Derivation=diff(y)./diff(x);
It didnt work.
0 Kommentare
Antworten (1)
Amith
am 17 Okt. 2024
Bearbeitet: Amith
am 17 Okt. 2024
Hi Bishwam,
To find partial derivative of (y) with respect to (x) in MATLAB, given that ( y ) is a ( 3 X 300 ) matrix and ( x ) is a ( 2 X 3 ) matrix, you can have a look at this example:
% Define symbolic variables
syms x1 x2 x3
y_sym = sym('y', [3, 300]);
% Example function f(x, y)
f = x1 * y_sym(1, :) + x2 * y_sym(2, :) + x3 * y_sym(3, :);
% Partial derivative of f with respect to x1
df_dx1 = diff(f, x1);
% Display the result
disp(df_dx1);
Adjust the function according to your requirements.
Hope this helps!
0 Kommentare
Siehe auch
Kategorien
Mehr zu Biotech and Pharmaceutical finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!