[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #45132] Funktion erzeugt Fehlermeldung vom Edi
From: |
anonymous |
Subject: |
[Octave-bug-tracker] [bug #45132] Funktion erzeugt Fehlermeldung vom Editor aus, läuft fehlerfrei im Befehlsfenster |
Date: |
Mon, 18 May 2015 15:07:44 +0000 |
User-agent: |
Mozilla/5.0 (Windows NT 5.1; rv:38.0) Gecko/20100101 Firefox/38.0 |
URL:
<http://savannah.gnu.org/bugs/?45132>
Summary: Funktion erzeugt Fehlermeldung vom Editor aus,
läuft fehlerfrei im Befehlsfenster
Project: GNU Octave
Submitted by: None
Submitted on: Mon 18 May 2015 03:07:42 PM UTC
Category: None
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: None
Status: None
Assigned to: None
Originator Name: Jörg Rauh
Originator Email: address@hidden
Open/Closed: Open
Discussion Lock: Any
Release: 3.8.2
Operating System: Microsoft Windows
_______________________________________________________
Details:
Dear Supporter,
Thank you for the good work you are doing!
As I am trying to understand the usage of
octave, I am working through some small
subroutines first.
If started in the commands window, it'll
work like a charm.
Yet, if in the editor window, pressing save
and execute creates an error message, saying
that one of the function parameters, when stored
into another variable, is not defined.
I don't get it.
With the given error message, I don't
know what I have to do so that my routine
is accepted and executed from the editor
window.
Best regards
Jörg
# AGM Arithmetisch-Geometrisches Mittel
#
format long
a=[0,0,0,0,0,0,0,0,0,0,0];
b=[0,0,0,0,0,0,0,0,0,0,0];
function r=agm(a0,b0)
r=0;
a(1)=a0;
b(1)=b0;
for i=1:10
a(i+1)=(a(i)+b(i))/2;
b(i+1)=sqrt(a(i)*b(i));
endfor
r=(a(11))
endfunction;
#
agm(3,4);
erzeugt folgende Fehlermeldung beim Versuch,
aus dem Editor zu starten:
error: 'a0' undefined near line 3 column 8
error: called from:
error: agm at line 3, column 7
während sie im Befehlsfenster einandfrei läuft:
>> # AGM Arithmetisch-Geometrisches Mittel
>> #
>> format long
>> a=[0,0,0,0,0,0,0,0,0,0,0];
>> b=[0,0,0,0,0,0,0,0,0,0,0];
>> function r=agm(a0,b0)
r=0;
a(1)=a0;
b(1)=b0;
for i=1:10
a(i+1)=(a(i)+b(i))/2;
b(i+1)=sqrt(a(i)*b(i));
endfor
r=(a(11))
endfunction;
>> #
>> agm(3,4);
r = 3.48202767635957
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?45132>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #45132] Funktion erzeugt Fehlermeldung vom Editor aus, läuft fehlerfrei im Befehlsfenster,
anonymous <=