help-octave
[Top][All Lists]
Advanced

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

if-tests being ignored?


From: Matthew Tylee Atkinson
Subject: if-tests being ignored?
Date: Fri, 04 Jan 2008 22:43:08 +0000

I'm a new user to Octave, so am sure that I'm missing something very
obvious but I really can't figure out what it is.

There are two problems I'm having (quite possibly related).  I would be
grateful for any advice you may have on how to fix them.  I have
attached a .m file that demonstrates them.  I'm running version 2.9.19.

1. When I run ``octave confused.m'' on the command-line, the plot
instruction seems to be ignored (fair enough, it could require to be run
in interactive mode, but when I use -i, it still is ignored).

2. When I source the file from within Octave, it loads and plots the
graph but the graph drawn is not as expected -- given the code, the
gradient of the graph should change twice at certain points along the x
axis.  It seems the if tests always evaluate to false.  When I run
``test(n)'' at the prompt, however, the correct values are returned from
the function.

Thanks for your time,

best regards,


-- 
Matthew Tylee Atkinson <address@hidden>

Attachment: confused.m
Description: Text Data


reply via email to

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