Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Matlab functions

  1. Mar 10, 2013 #1
    I'm trying to understand how to use functions of the form:

    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.

    Found answer here:
  2. jcsd
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Can you offer guidance or do you also need help?
Draft saved Draft deleted

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