Thread Subject: problems calling a function from a script

Subject: problems calling a function from a script

From: Louise

Date: 16 Nov, 2009 15:51:05

Message: 1 of 1

Hi all,

I have a script m-file which calls a function to generate an array, here is the sample lines:

    F_initial = min(min(F));
    F_end = max(max(F));
    number_elements = 60;
    
    intensity(:,1) = intensity_step(F_end,F_initial,number_elements);

The function 'intensity_step' is saved in the same directory as the script file. It has also worked in previous m-files. However, in this instance it continuously returns the error message:

??? Undefined function or
method 'intensity_step'
for input arguments of
type 'double'.

Error in ==>
volumes_over_columns_edit_161109
at 60
    intensity(:,1) =
    intensity_step(F_end,F_initial,number_elements);

I am sure this is some simple oversight on my part, but I just can't seem to see it! I have looked at other posts but nothing seems to be directly applicable here. Anyone have any advice?

Thanks!

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
function Louise 16 Nov, 2009 10:54:04
rssFeed for this Thread

Contact us at files@mathworks.com