MATLAB MATLAB function trouble using (wtls_line)

  • Thread starter NeoGenus59
  • Start date
Hello,

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.

-Michael

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

Attachments

Last edited:

Want to reply to this thread?

"MATLAB function trouble using (wtls_line)" You must log in or register to reply here.

Related Threads for: MATLAB function trouble using (wtls_line)

Replies
0
Views
4K
  • Posted
Replies
0
Views
5K
Replies
0
Views
5K
  • Posted
Replies
0
Views
2K
Replies
0
Views
3K
Replies
0
Views
2K

Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving
Top