partial derivatives matrix and Integrations
18 views (last 30 days)
Show older comments
Eddy Ramirez on 6 Oct 2021
Answered: Abhishek Kolla on 11 Nov 2021
Kindly requesting your assistance, I am running the following code and I am getting some errors. I am trying to get the partial derivative of a matrix in terms of X and Y. Based on the research I have conducted, it says that I could utilize the gradient option, but the error says "too many output arguments".
Also, for integrations would it be possible to get the feedback if I am coding it correctly. The X integration is from 0 to 4 and y from 0 to 3. I ran the code, but since I am getting the error for the partial derivative the code will not run the last part.
t=.1; %inches - Thickness
D=(E/(1-v^2))*[1 v 0;v 1 0; 0 0 ((1-v)/2)];
H=[h1 0 h2 0 h3 0 h4 0; %X
0 h1 0 h2 0 h3 0 h4]; %Y
Abhishek Kolla on 11 Nov 2021
In the above code the output of gradient will return x and y components of the two dimensional numerical gradient of matrix F. More detailed explanation on gradient can be found here Numerical gradient - MATLAB gradient (mathworks.com)
Define any interval range for both x and y after declaring x and y
x = -2:0.2:2;
y = x';
After making the following changes the gradient function will work and both HX,HY will be obtained
Find more on Numerical Integration and Differentiation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!