Double integral problem with function handles to make the program faster instead of using symbolic
Show older comments
Hello Sir, I am trying to solve a plate problem with Rayleigh. Instead of doing all the double integrals with symbolic functions, i would like to make it with function handles. Symbolic tools are taking so much. May you please check me my code? There is a vector (lets assume, it is 3*1) I would like to take each of elements, respectively and make it double integral (From ksi=-1 to1, ita =-1 to 1). But it is giving error.I really preciate if you could help me to take integral from ksi =-1 to 1, and ita=-1 to 1. My regards.
Here is my code:
clc
clear all
i=3; %actually this will be loop from i=1: 10 (but i will not store)
dTksi = @(ksi,ita) [0;1;(1*(1+ksi)/2)];
dTita =@(ksi,ita,a) [0;1;1*(1*(1+ita)/2)];
getRow = @(data, rowNum) data(rowNum, :); % Helper function
P00_Q00= @(ksi,ita) ((getRow(dTksi(ksi,ita), i)).*(getRow(dTita(ksi,ita), i)));
ff=(int(int(P00_Q00(ksi,ita),-1,1),-1,1)) % it is not calculating.
dfuita=@(ksi,ita) (-2*ita);
ddfuksi_P00_Q00= @(ksi,ita) dfuita(ksi,ita).*P00_Q00(ksi,ita); %it is calculating
%fun = integral2(@(ksi,ita) dfuita(ksi,ita).*(1-ita.^2),-1,1,-1,1)
fun=(int(int(dfuita(ksi,ita).*P00_Q00(ksi,ita),-1,1),-1,1)) % it is not calculating.
Accepted Answer
More Answers (0)
Categories
Find more on Programming 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!