Hello, found this forum very instructive!(adsbygoogle = window.adsbygoogle || []).push({});

I had this doubt of numerical integration in MATLAB. I have to perform this integration in matlab:

r = 0:0.01:22.5; //necessary because they automatically become lower and upper limits of integration!

theta=0:pi/100:pi; // limits are not to be necessarily these

f = 6.09*r*sin(theta);

expr = besselj(0,f)*r * (1-0.7.*r);

int_ans = trapz(expr,r) // integrating wrt r only..theta must remain like const!

now here matrix dimensions are not agreeing! Should i multiply r.*sin(theta) or r*sin(theta) or r' * sin(theta)??

kindly help in this regarding handling num int with multiple variables

btw i have to plot the final answer wrt theta!!

please help..would be very obliged!

**Physics Forums - The Fusion of Science and Community**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Regarding MATLAB

Loading...

Similar Threads - Regarding MATLAB | Date |
---|---|

How to program this in Matlab | Feb 28, 2018 |

Mathematica: Regarding ListPlot and Manipulate | Mar 7, 2012 |

A quick question regarding matlab | Oct 3, 2011 |

Strange error regarding table in latex | Jun 17, 2009 |

Mathematical detail regarding Boltzman's H thm | Oct 3, 2006 |

**Physics Forums - The Fusion of Science and Community**