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

MATLAB function trouble using (wtls_line)

  1. Jun 14, 2012 #1

    I'm new here and I'm trying to figure out how to use MATLAB to crunch some numbers about neutron counts. I have data from a detctor and ultimately I'd like to linearize it!

    I'm using wtls_line found at: http://www.mathworks.com/matlabcentral/fileexchange/17466-weighted-total-least-squares-straight-line-fit/content/wtls_line.m

    OK so when I go to extract the data--attached, I use a column, from a file of type .m, which is a double (and I believe is the cause of the problem).

    Upon trying to use wtls_line, I define xin, yin, uxin, yxin, and guck, (all are necessary to work properly, correct?) Then I type:

    [a,b,alpha,p,chiopt,Cab,Calphap]= wtls_line(xin,yin,uxin,uyin,guck)

    which returns

    Undefined function 'wtls_line' for input arguments of type 'double'.

    It may be that I don't know how to properly call upon a function but I think I either need to change the data I'm extracting from double to something else or the problem is something that I don't know. Does anyone have any clue how to solve this issue?

    Also, I plan on plotting this information against the same data type (neutron counts) but for other detectors... (may be irrelevant)

    I appreciate any help you can offer! Thank you.


    Figured it out: the file name didn't match the function name. I did a 'save as...' and changed the name. Sorry.

    Attached Files:

    Last edited: Jun 14, 2012
  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 function trouble 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