help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Hardlim


From: Dimitri
Subject: Hardlim
Date: Fri, 17 Jul 2009 04:30:01 +0000 (GMT)

I guys.
I am newbe in octave an in this list. I have a question about use a Matlab Code 
in Octave. I have this code:

case 3,
   disp(sprintf('\n** PART III - CLONALG (The CLONal Selection ALGorithm) **'));
   v = cadeia(100,44,0,0,0);
   disp(sprintf('Available Demo Tasks:'));
   disp(sprintf('1) GA (GLOBAL SEARCH)'));
   disp(sprintf('2) CLONALG (MULTI-MODAL OPTIMIZATION)'));
   disp(sprintf('3) CHARACTER (KNOWLEDGE ACQUISITION)'));
   ga_cga = input('Type the desired demo number (1) ,(2) or (3): ');
   switch ga_cga,
..................

% Function CADEIA
function [ab,ag] = cadeia(n1,s1,n2,s2,bip)
if nargin == 2,
   n2 = n1; s2 = s1; bip = 1;
elseif nargin == 4,
   bip = 1;
end;
% Antibody (Ab) chains
ab = 2 .* rand(n1,s1) - 1;
if bip == 1,
   ab = hardlims(ab);
else,
   ab = hardlim(ab);
end;
% Antigen (Ag) chains
ag = 2 .* rand(n2,s2) - 1;
if bip == 1,
   ag = hardlims(ag);
else,
   ag = hardlim(ag);
end;
% End Function CADEIA

All before code is fine until line  v = cadeia(100,44,0,0,0); When run cadeia 
function:

Display this error:

** PART III - CLONALG (The CLONal Selection ALGorithm) **
error: `hardlim' undefined near line 182 column 9
error: evaluating assignment expression near line 182, column 7
error: evaluating if command near line 179, column 1
error: called from `tutorial:cadeia' in file `/home/deoxy/AIS/tutorial.m'
error: evaluating assignment expression near line 83, column 6
error: evaluating switch command near line 48, column 1
error: called from `tutorial:choose' in file `/home/deoxy/AIS/tutorial.m'
error: evaluating while command near line 20, column 1
error: called from `tutorial' in file `/home/deoxy/AIS/tutorial.m'

Hardlim is supported for Octave?. Exist any replace order?.

Regards.

Dimitri.-
http://deoxyt2.livejournal.com
OpenBSD - Free, Functional & Secure


      



reply via email to

[Prev in Thread] Current Thread [Next in Thread]