I'm trying to understand how to use functions of the form:(adsbygoogle = window.adsbygoogle || []).push({});

fun = @(x) exp(-x.^2).*log(x).^2;

I see this syntax in various examples online, but when I try to use it I get the error:

"Attempt to execute SCRIPT integral as a function"

As a side note, it seems like every time I find an example of a script on the matlab website, I copy and paste it into matlab and it doesn't work. Am I going about learning this software the wrong way? The mathworks.com documentation center seems to frequently assume you already know something about the code, but it doesn't provide links to go back and read up on what you don't understand. It's a pretty frustrating website in my opinion. If anyone has advice on how to learn this software, please let me know what it is.

edit:

Found answer here:

https://www.physicsforums.com/showthread.php?p=4302248&posted=1#post4302248

**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!

# Matlab functions

Can you offer guidance or do you also need help?

Draft saved
Draft deleted

Loading...

Similar Threads - Matlab functions | Date |
---|---|

Working with Edge function in MATLAB | Mar 7, 2017 |

Matlab Does MatLab have this kind of function? | Jan 15, 2017 |

Matlab error matrix function | Apr 25, 2016 |

Matlab Plotting a 3d function | Apr 1, 2016 |

Fit with implicit nonlinear function - Matlab | Oct 19, 2015 |

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