James Sherman Jr.
shermanj at umd.edu
Thu Mar 26 11:17:19 CDT 2009
Are you trying to call complet from the command prompt in octave? If so,
its failing because externally, octave can only see the first function in a
file. (That is probably not a good explanation, but I think it conveys the
right idea.) If you want to call complet from the command line, you'll need
to put it in a new file.
If thats not the problem you're having, are you sure you're in the right
directory? Is the file named checkp.m? I think you're going to need to be
more specific before I can try and be of any more help.
James
2009/3/25 ann sww <annsww at yahoo.com>
> i try to write twi function and one is calling the other
>
> function [myprime]=checkp(value)
> value=input('inter a value');
>
> myprime=complet(value)
> check=complet.*1;
> if check==1
> disp('true prime');
> else
> disp('false prime');
> end
>
>
>
> function myprime=complet()
> value=input('value');
> complet=1;
> number=2;
> myprime=complet;
> while complet==1 & number<value
>
> divesion=value/number;
>
> round_divesion=round(divesion);
>
> differance=(divesion-round_divesion);
>
> if differance ~= 0
> complet=1;
> else
> complet=0;
> end
>
> number=number+1;
>
> end
>
> // the name of the function is always undefined
>
>
> ------------------------------
> Enjoy a better web experience. Upgrade to the new Internet Explorer 8
> optimised for Yahoo!7. Get it now.<http://au.rd.yahoo.com/search/ie8/mailtagline/*http://us.lrd.yahoo.com/_ylc=X3oDMTJxbnQwdTJhBF9zAzIxNDIwMjU2NTkEdG1fZG1lY2gDVGV4dCBMaW5rBHRtX2xuawNVMTEwMzQ0OAR0bV9uZXQDWWFob28hBHRtX3BvcwN0YWdsaW5lBHRtX3BwdHkDYXVueg--/SIG=11k6t9t1c/**http://downloads.yahoo.com/au/internetexplorer/>
> .
>
> _______________________________________________
> Help-octave mailing list
> Help-octave at octave.org
> https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090326/04b086f3/attachment.html
More information about the Help-octave
mailing list