From: mohd syauqee on
"Dan " <dan.omry.nospam(a)mathworks.com> wrote in message <fdg9k3$pld$1(a)fred.mathworks.com>...
> I have been going in circles trying to figure it out.
>
> 'interpol' is a simple interpolation function that outputs
> a "refined" (n x 2) matrix (array2) which is figured from
> a "coarse" (m x 2) input matrix (array1) where n > m.
> Column 1 is comprised of rounded numbers. The function
> checks the gaps between each two adjacent numbers in column
> 1 (numbers in column 1 continuously increase), and creates
> array2 by inserting in column 1 numbers stepped by 1,
> starting with the first number of array1, and inserting
> numbers in column 2 by linear interpolation on the original
> array1 numbers' gaps.
>
> The function works perfectly when I create array1 in the
> Work Space and call the function manually.
>
> I then created a program ('data_input_arrays') that reads a
> two-column matrix from a text file and manipulates it a
> little (multiplying the numbers by 100000 and rounding them)
> to create array1. It then calls the function Interpol
> array2 = Interpol(array1).
> When running the program, it aborts and gives the error
> message:
> -------------------------------------------------------
> ??? Undefined function or method 'inerpol' for input
> arguments of type 'double'.
>
> Error in ==> data_input_arrays at 31
> array2 = inerpol(array1) ;
> -------------------------------------------------------
> In subsequent runs I forced array1 format to be anything
> possible, double, single, int64, int32 and whatever. I keep
> getting the same error message, with the format I have
> specified in the message. What interesting is that when the
> program aborts, if I type array1 I get the correct array1
> displayed, and if then I manually type interpol(array1) I
> get the correct array2. MATLAB's help did not help much.
> Can anyone?
>
??? Undefined function or method 'blockFrames' for input arguments of type 'double'.
the error is from ;
M = 100;
N = 256;
frames = blockFrames(s1, fs1, M, N);
t = N / 2;
tm = length(s1) / fs1;
subplot(121);
imagesc([0 tm], [0 fs1/2], abs(frames(1:t, :)).^2), axis xy;