From: Razia on
Hello,

I have matrix X of dimensions (n x m) and a another matrix Y of dimensions (n x 1). I need to create many plots in separate figures of X against Y for each row ie. i should get n plots. But i dont want them to be displayed when i run the m-file; i just want them to be saved somewhere.
Ive tried the code below but when i run it, nothing is displayed in the figure:

for i=1:length(x);
h=plot(x(i,:),y(i,:));
end

I also need to do this using cftool, would it be possible with cftool?

Any help will be much appreciated!

Thanks
From: Konark on
"Razia " <zxcv23(a)hotmail.co.uk> wrote in message <hfgdgo$pi9$1(a)fred.mathworks.com>...
> Hello,
>
> I have matrix X of dimensions (n x m) and a another matrix Y of dimensions (n x 1). I need to create many plots in separate figures of X against Y for each row ie. i should get n plots. But i dont want them to be displayed when i run the m-file; i just want them to be saved somewhere.
> Ive tried the code below but when i run it, nothing is displayed in the figure:
>
> for i=1:length(x);
> h=plot(x(i,:),y(i,:));
> end
>
> I also need to do this using cftool, would it be possible with cftool?
>
> Any help will be much appreciated!
>
> Thanks


Hello

First u need to extract element of Y and replicate to form a vector whose length is equal to the column size of x , then after u can use plot command that u used