Hello,(adsbygoogle = window.adsbygoogle || []).push({});

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 usingwtls_linefound 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 usewtls_line, I definexin, yin, uxin, yxin,andguck, (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.

-Michael

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

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

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# MATLAB function trouble using (wtls_line)

Can you offer guidance or do you also need help?

Draft saved
Draft deleted

Loading...

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 |

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