It seems like you are using load and save incorrectly. Type 'help save' and
'help load' to see examples of the correct use of these functions. As far
as I can recall, when you load data from 'file.mat' you will need to assign
the output of load to some variable, e.g.
p= load('file.mat');
Check the help files in any case because I am doing this off the top of my
head...
Roy
bizon wrote:
> Hello,
>
> Supposing we have:
>
> save file.mat p
>
> and p is:
>
> p=[ 2 3 4;5 6 7]
>
> now I would like to read the data from a file and use it in another file
> for example I have a function
>
> function [y]=bip(p,i,n);
>
> load file p;
>
> for i=1:n
> if (p==1)&(i==1)
> block=p(n,:);
> end
> end
>
>
> Why it does not work?Matlab displays an error: undefined variable
>
> Please about a help in correcting this.
>
> I greet,
>
> Tomek
|