plot separating line

Hello,
Please,this is my program and I want to plot separating line for
my array but the problem that only one figure appeared in my
program and I must draw four figure not only one for the array,so
what is the problem?? please help me
clear all;
clc;
disp('Hebb network for XOR function Bipolar inputs and targets');
%input pattern
x1=[1 1 -1 -1];
x2=[1 -1 1 -1];
%bias input
x3=[1 1 1 1];
%target vector
t=[-1 1 1 -1];
%initial weights and bias
w1=0;w2=0;b=0;
for i=1:4
delw1=x1(i)*t(i);
delw2=x2(i)*t(i);
delb=x3(i)*t(i);
%weight change
wc=[delw1 delw2 delb];
%updating of weights
w1=w1+delw1;
w2=w2+delw2;
b=b+delb;
%new weights
w=[w1 w2 b];
disp(w);
m=(-x1*(w1(i)/w2(i)))-(b(i)/w2(i));
plot(m);
end

回答 (1 件)

Jan
Jan 2012 年 2 月 24 日

0 投票

Insert a figure inside the loop to open a new window:
...
for i=1:4
figure;
...

3 件のコメント

reem
reem 2012 年 2 月 24 日
Thanks Jan for your answer
but when I do that, only one figure appears to me and
I need to display four figures not only one and this is my main
problem,please help me in that.
Jan
Jan 2012 年 2 月 25 日
I do not think that this creates one figure only:
for i=1:4, figure; end
Malcolm Lidierth
Malcolm Lidierth 2012 年 2 月 25 日
Is the OP after 4 lines in 1 figure? If so, try putting "hold on" after the plot command in the loop.

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeDeep Learning Toolbox についてさらに検索

質問済み:

2012 年 2 月 24 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by