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.

    edit:
    Found answer here:
    https://www.physicsforums.com/showthread.php?p=4302248&posted=1#post4302248
     
  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 Discussions: Matlab functions
  1. Matlab function (Replies: 2)

  2. MATLAB function (Replies: 2)

  3. Matlab function (Replies: 1)

  4. Matlab functions (Replies: 0)

  5. MATLAB function (Replies: 1)

Loading...