MATLAB How can I use Matlab for numerical integration?

AI Thread Summary
To integrate an unknown vector and visualize the result, users discussed the integration of a sine curve, which results in a cosine function. The primary tools mentioned for achieving this in MATLAB are the gradient and cumtrapz functions, which effectively handle the integration and plotting of the results. A helpful resource for MATLAB users was also shared, providing additional guidance on the topic.
wildman
Messages
29
Reaction score
4
I figured it out. Thanks!
 
Last edited:
Physics news on Phys.org
i want to integrate a vector(which function is unknown) and plot the result.suppose a sin curve is given(but i dint know it).which integration will be cosine.so i want to see the exact plot.how can i do it?
 
tauhid035 said:
i want to integrate a vector(which function is unknown) and plot the result.suppose a sin curve is given(but i dint know it).which integration will be cosine.so i want to see the exact plot.how can i do it?

I've got the same question. Any help would be appreciated.
thanks
 
dunno if anyone is still looking at this thread but I found this site really helpful
http://www.tufts.edu/~rwhite07/Matlab.html"

the gradient and cumtrapz functions took care of it.
 
Last edited by a moderator:

Similar threads

Back
Top