http://www.mathworks.com/matlabcentral/newsreader/view_thread/283396
MATLAB Central Newsreader  Error in MIN and MAX
Feed for thread: Error in MIN and MAX
enus
©19942015 by MathWorks, Inc.
webmaster@mathworks.com
MATLAB Central Newsreader
http://blogs.law.harvard.edu/tech/rss
60
MathWorks
http://www.mathworks.com/images/membrane_icon.gif

Sat, 29 May 2010 17:41:06 +0000
Error in MIN and MAX
http://www.mathworks.com/matlabcentral/newsreader/view_thread/283396#750034
roya olyazadeh
This is my matrix : <br>
<br>
X00 =<br>
<br>
Columns 1 through 3 <br>
<br>
1000 939.073645098372 814.549313652745<br>
<br>
Columns 4 through 6 <br>
<br>
878.926 912.009169278451 893.126889224274<br>
<br>
<br>
??? Subscript indices must either be real positive integers or logicals.<br>
<br>
Error in ==> networkadjustment at 480<br>
min(X00)<br>
<br>
<br>
What is the problem ? each element seems to be real positive integers.

Sat, 29 May 2010 17:51:22 +0000
Re: Error in MIN and MAX
http://www.mathworks.com/matlabcentral/newsreader/view_thread/283396#750038
Bruno Luong
"roya olyazadeh" <roya2543@gmail.com> wrote in message <htrjji$34i$1@fred.mathworks.com>...<br>
<br>
> <br>
> What is the problem ? each element seems to be real positive integers. <br>
<br>
Do not name your variable MIN<br>
<br>
Bruno

Sat, 29 May 2010 17:55:21 +0000
Re: Error in MIN and MAX
http://www.mathworks.com/matlabcentral/newsreader/view_thread/283396#750039
Matt Fig
You are the 1,345,657th person to name a variable after a builtin MATLAB function, then try to call the function.

Sat, 29 May 2010 17:56:23 +0000
Re: Error in MIN and MAX
http://www.mathworks.com/matlabcentral/newsreader/view_thread/283396#750041
Roger Stafford
"roya olyazadeh" <roya2543@gmail.com> wrote in message <htrjji$34i$1@fred.mathworks.com>...<br>
> This is my matrix : <br>
> <br>
> X00 =<br>
> <br>
> Columns 1 through 3 <br>
> <br>
> 1000 939.073645098372 814.549313652745<br>
> <br>
> Columns 4 through 6 <br>
> <br>
> 878.926 912.009169278451 893.126889224274<br>
> <br>
> <br>
> ??? Subscript indices must either be real positive integers or logicals.<br>
> <br>
> Error in ==> networkadjustment at 480<br>
> min(X00)<br>
> <br>
> <br>
> What is the problem ? each element seems to be real positive integers. <br>
<br>
I would guess that somewhere you have an array named 'min' and matlab is objecting to the fact that the elements of X00, used as indices into 'min', are not positive integers, which in fact they are *not*.<br>
<br>
You should never give your variables the names of matlab functions, for precisely this reason.<br>
<br>
Roger Stafford

Sat, 29 May 2010 18:06:08 +0000
Re: Error in MIN and MAX
http://www.mathworks.com/matlabcentral/newsreader/view_thread/283396#750044
Matt Fig
Put this function in your current directory, then just before the line that errors in networkadjustment (line 480) call CHECKVARS.<br>
<br>
<br>
<br>
<br>
function [] = checkvars()<br>
%CHECKVARS Check the variables in current workspace for function masking. <br>
% CHECKVARS finds out if one of the variables in the current workspace is <br>
% masking another function or directory or javaclass. If any variables are <br>
% masking something on the searchpath, a warning will be issued in the <br>
% command window. If no conflicts are found, CHECKVARS returns nothing.<br>
%<br>
%<br>
% Author: Matt Fig<br>
<br>
<br>
who_out = evalin('caller','who'); % Get a list of variables in caller.<br>
<br>
for ind_var = 1:length(who_out)<br>
exist_out = exist(who_out{ind_var}); %#ok Find if other names match.<br>
<br>
switch exist_out<br>
case 2<br>
conflict_type = ' MFile function.';<br>
case 3<br>
conflict_type = ' MEX function.'; <br>
case 4<br>
conflict_type = ' mdl file.'; <br>
case 5<br>
conflict_type = ' builtin function.'; <br>
case 6<br>
conflict_type = ' PFile function.'; <br>
case 7<br>
conflict_type = ' directory.'; <br>
case 8<br>
conflict_type = ' Java class.'; <br>
otherwise<br>
exist_out = 0;<br>
end<br>
<br>
if exist_out<br>
fprintf(['''',who_out{ind_var},...<br>
''' may be masking a',conflict_type,'\n'])<br>
end<br>
end

Sat, 29 May 2010 18:10:21 +0000
Re: Error in MIN and MAX
http://www.mathworks.com/matlabcentral/newsreader/view_thread/283396#750045
Matt J
"roya olyazadeh" <roya2543@gmail.com> wrote in message <htrjji$34i$1@fred.mathworks.com>...<br>
<br>
> ??? Subscript indices must either be real positive integers or logicals.<br>
> <br>
> Error in ==> networkadjustment at 480<br>
> min(X00)<br>
> <br>
> <br>
> What is the problem ? each element seems to be real positive integers. <br>
==============<br>
<br>
Another fix, if you really want a variable named 'min'. Change line 480 of networkadjustment.m to,<br>
<br>
myMin(X00)<br>
<br>
Then, as the first line of code in the file, add<br>
<br>
myMin=@min;

Sat, 29 May 2010 18:29:08 +0000
Re: Error in MIN and MAX
http://www.mathworks.com/matlabcentral/newsreader/view_thread/283396#750052
Matt J
"Matt J " <mattjacREMOVE@THISieee.spam> wrote in message <htrlad$im4$1@fred.mathworks.com>...<br>
<br>
> Then, as the first line of code in the file, add<br>
> <br>
> myMin=@min;<br>
<br>
Make that<br>
<br>
myMin=eval('@min'); %a deliberately horrible use of eval

Sat, 29 May 2010 18:32:06 +0000
Re: Error in MIN and MAX
http://www.mathworks.com/matlabcentral/newsreader/view_thread/283396#750053
roya olyazadeh
"Matt Fig" <spamanon@yahoo.com> wrote in message <htrke8$o1o$1@fred.mathworks.com>...<br>
> You are the 1,345,657th person to name a variable after a builtin MATLAB function, then try to call the function.<br>
<br>
How did you count this number??

Sat, 29 May 2010 18:37:21 +0000
Re: Error in MIN and MAX
http://www.mathworks.com/matlabcentral/newsreader/view_thread/283396#750057
Walter Roberson
roya olyazadeh wrote:<br>
> "Matt Fig" <spamanon@yahoo.com> wrote in message <br>
> <htrke8$o1o$1@fred.mathworks.com>...<br>
>> You are the 1,345,657th person to name a variable after a builtin <br>
>> MATLAB function, then try to call the function.<br>
> <br>
> How did you count this number??<br>
<br>
Well, you know Matt  he prefers to understand things.

Sat, 29 May 2010 18:39:08 +0000
Re: Error in MIN and MAX
http://www.mathworks.com/matlabcentral/newsreader/view_thread/283396#750058
Bruno Luong
"roya olyazadeh" <roya2543@gmail.com> wrote in message <htrmj6$8u8$1@fred.mathworks.com>...<br>
><br>
> <br>
> How did you count this number?? <br>
<br>
Perhaps with a working MIN function.<br>
<br>
Bruno

Sat, 29 May 2010 19:37:05 +0000
Re: Error in MIN and MAX
http://www.mathworks.com/matlabcentral/newsreader/view_thread/283396#750069
John D'Errico
"roya olyazadeh" <roya2543@gmail.com> wrote in message <htrmj6$8u8$1@fred.mathworks.com>...<br>
> "Matt Fig" <spamanon@yahoo.com> wrote in message <htrke8$o1o$1@fred.mathworks.com>...<br>
> > You are the 1,345,657th person to name a variable after a builtin MATLAB function, then try to call the function.<br>
> <br>
> How did you count this number?? <br>
<br>
Matt has kept a careful record of every such occurrence,<br>
an arduous task, with very little reward. In fact, we are<br>
quite amazed at his diligence. <br>
<br>
Keep it up Matt!<br>
<br>
John

Sat, 29 May 2010 21:07:25 +0000
Re: Error in MIN and MAX
http://www.mathworks.com/matlabcentral/newsreader/view_thread/283396#750076
Walter Roberson
Walter Roberson wrote:<br>
> roya olyazadeh wrote:<br>
>> "Matt Fig" <spamanon@yahoo.com> wrote in message <br>
>> <htrke8$o1o$1@fred.mathworks.com>...<br>
>>> You are the 1,345,657th person to name a variable after a builtin <br>
>>> MATLAB function, then try to call the function.<br>
>><br>
>> How did you count this number??<br>
> <br>
> Well, you know Matt  he prefers to understand things.<br>
<br>
Opps, I meant "understate" not "understand".

Sat, 29 May 2010 21:38:22 +0000
Re: Error in MIN and MAX
http://www.mathworks.com/matlabcentral/newsreader/view_thread/283396#750080
james bejon
> > > You are the 1,345,657th person to name a variable after a builtin MATLAB function, then try to call the function.<br>
> > <br>
> > How did you count this number?? <br>
> <br>
<br>
Behind the scenes, CSSM has a static variable called 'sum' which keeps a total of such things.

Sat, 29 May 2010 21:46:03 +0000
Re: Error in MIN and MAX
http://www.mathworks.com/matlabcentral/newsreader/view_thread/283396#750084
Matt Fig
Walter Roberson <roberson@hushmail.com> wrote in message <br>
> Opps, I meant "understate" not "understand".<br>
<br>
<br>
Now it makes sense, I couldn't figure out what you meant!

Sat, 29 May 2010 21:47:04 +0000
Re: Error in MIN and MAX
http://www.mathworks.com/matlabcentral/newsreader/view_thread/283396#750085
Matt Fig
It must be a slow day when a masking variable thread stays in the top 5 for hours on end...

Sun, 30 May 2010 07:50:08 +0000
Re: Error in MIN and MAX
http://www.mathworks.com/matlabcentral/newsreader/view_thread/283396#750155
Steve Amphlett
"Matt Fig" <spamanon@yahoo.com> wrote in message <hts20o$vt$1@fred.mathworks.com>...<br>
> It must be a slow day when a masking variable thread stays in the top 5 for hours on end...<br>
<br>
I still think it's a huge problem with the Matlab language. A massive boobytrap sitting there, waiting. A bit like Fortran's implicit declaration of missspelled variables or variables truncated by the 72'nd column cutoff.

Sun, 30 May 2010 12:38:07 +0000
Re: Error in MIN and MAX
http://www.mathworks.com/matlabcentral/newsreader/view_thread/283396#750200
Matt J
"Steve Amphlett" <Firstname.Lastname@WhereIWork.com> wrote in message <htt5bg$fli$1@fred.mathworks.com>...<br>
<br>
> I still think it's a huge problem with the Matlab language. A massive boobytrap sitting there, waiting. <br>
=============<br>
<br>
I'm actually a bit dumbfounded by how often this occurs. If you're trying to use the same name for two different things (function and variable), I tend to think that you really don't know what's going on in your code.

Sun, 30 May 2010 12:44:25 +0000
Re: Error in MIN and MAX
http://www.mathworks.com/matlabcentral/newsreader/view_thread/283396#750203
dpb
Steve Amphlett wrote:<br>
> "Matt Fig" <spamanon@yahoo.com> wrote in message <br>
> <hts20o$vt$1@fred.mathworks.com>...<br>
>> It must be a slow day when a masking variable thread stays in the top <br>
>> 5 for hours on end...<br>
> <br>
> I still think it's a huge problem with the Matlab language. A massive <br>
> boobytrap sitting there, waiting. A bit like Fortran's implicit <br>
> declaration of missspelled variables ...<br>
<br>
"IMPLICIT NONE"<br>
<br>
> ... or variables truncated by the 72'nd column cutoff.<br>
<br>
freeform source format...<br>
<br>
:)<br>
<br>


Sun, 30 May 2010 13:16:32 +0000
Re: Error in MIN and MAX
http://www.mathworks.com/matlabcentral/newsreader/view_thread/283396#750208
dpb
Matt J wrote:<br>
> "Steve Amphlett" <Firstname.Lastname@WhereIWork.com> wrote in message <br>
> <htt5bg$fli$1@fred.mathworks.com>...<br>
> <br>
>> I still think it's a huge problem with the Matlab language. A massive <br>
>> boobytrap sitting there, waiting. <br>
> =============<br>
> <br>
> I'm actually a bit dumbfounded by how often this occurs. If you're <br>
> trying to use the same name for two different things (function and <br>
> variable), I tend to think that you really don't know what's going on in <br>
> your code.<br>
<br>
OTOH, given the size of the ML namespace, in some ways my surprise is it <br>
doesn't happen even more often... :)<br>
<br>
"i" and "j" are probably the two most common index variables <br>
ubiquitously used in other code; it's essentially automatic to write <br>
them for anybody who's ever written in any other language at all.<br>
<br>
The min() and max() names are, while possibly could claim they always <br>
ought to be minx or miny or somesuch amplified naming convention no <br>
matter what seem perfectly reasonable to use as variable names. And, of <br>
course, if one comes from Fortran (listening, Rune??? :) ) where <br>
function names and variable names are in different name spaces, it's <br>
perfectly permissible (altho I don't recommend it, it makes one not <br>
consider as carefully as otherwise might) in picking names.<br>
<br>
One could go on w/ examples... :)<br>
<br>


Sun, 30 May 2010 16:12:05 +0000
Re: Error in MIN and MAX
http://www.mathworks.com/matlabcentral/newsreader/view_thread/283396#750234
Matt J
dpb <none@non.net> wrote in message <httojr$f0t$1@news.eternalseptember.org>...<br>
<br>
> > I'm actually a bit dumbfounded by how often this occurs. If you're <br>
> > trying to use the same name for two different things (function and <br>
> > variable), I tend to think that you really don't know what's going on in <br>
> > your code.<br>
> <br>
> OTOH, given the size of the ML namespace, in some ways my surprise is it <br>
> doesn't happen even more often... :)<br>
<br>
No, the save of the Matlab namespace is not relevant. It is perfectly harmless to use i, j, min, max, etc... as variable names as long as you don't then try to use them as functions later on in the same workspace. <br>
<br>
The problem only occurs when people deliberately try to use the same name for 2 different things in the same mfile.

Sun, 30 May 2010 17:02:56 +0000
Re: Error in MIN and MAX
http://www.mathworks.com/matlabcentral/newsreader/view_thread/283396#750244
freund@mail.biu.ac.il
Dear Mike,<br>
<br>
Is there a way to turn on <checkvars> and have it run in the background until turned off? I tested one of my functions that I use all the time by inserting checkvars as the last line, and was amazed to find four instances of shadowing that involved three obscure Matlab functions such as Zb, and a function that I wrote years ago and had stupidly named G1. After the test I decided the shadowing was in these cases innocuous, and deleted checkvars. But it is obviously not practical to check all my functions this way. In many cases functions are deeply nested, and shadowing could have the potential to produce undetected errors. Ideally, checkvars would tell you the name of the mfile and the line number.<br>
<br>
Thanks,<br>
<br>
Ize

Sun, 30 May 2010 17:06:32 +0000
Running checkvars in the background
http://www.mathworks.com/matlabcentral/newsreader/view_thread/283396#750245
freund@mail.biu.ac.il
Dear Mike,<br>
<br>
Is there a way to turn on <checkvars> and have it run in the background until turned off? I tested one of my functions that I use all the time by inserting checkvars as the last line, and was amazed to find four instances of shadowing that involved three obscure Matlab functions such as Zb, and a function that I wrote years ago and had stupidly named G1. After the test I decided the shadowing was in these cases innocuous, and deleted checkvars. But it is obviously not practical to check all my functions this way. In many cases functions are deeply nested, and shadowing could have the potential to produce undetected errors. Ideally, checkvars would tell you the name of the mfile and the line number.<br>
<br>
Thanks,<br>
<br>
Ize

Sun, 30 May 2010 20:38:19 +0000
Re: Error in MIN and MAX
http://www.mathworks.com/matlabcentral/newsreader/view_thread/283396#750282
Rune Allnor
On 30 Mai, 15:16, dpb <n...@non.net> wrote:<br>
> Matt J wrote:<br>
> > "Steve Amphlett" <Firstname.Lastn...@WhereIWork.com> wrote in message<br>
> > <htt5bg$fl...@fred.mathworks.com>...<br>
><br>
> >> I still think it's a huge problem with the Matlab language. A massive<br>
> >> boobytrap sitting there, waiting. <br>
> > =============<br>
><br>
> > I'm actually a bit dumbfounded by how often this occurs. If you're<br>
> > trying to use the same name for two different things (function and<br>
> > variable), I tend to think that you really don't know what's going on in<br>
> > your code.<br>
><br>
> OTOH, given the size of the ML namespace, in some ways my surprise is it<br>
> doesn't happen even more often... :)<br>
><br>
> "i" and "j" are probably the two most common index variables<br>
> ubiquitously used in other code; it's essentially automatic to write<br>
> them for anybody who's ever written in any other language at all.<br>
><br>
> The min() and max() names are, while possibly could claim they always<br>
> ought to be minx or miny or somesuch amplified naming convention no<br>
> matter what seem perfectly reasonable to use as variable names. And, of<br>
> course, if one comes from Fortran (listening, Rune??? :) ) where<br>
> function names and variable names are in different name spaces, it's<br>
> perfectly permissible<br>
<br>
So you are saying that it is not the programming language<br>
but the programmer's experience that determinec what features<br>
he will be allowed to use in his programs...?<br>
<br>
> (altho I don't recommend it, it makes one not<br>
> consider as carefully as otherwise might) in picking names.<br>
<br>
This is the strength that C++ offers, which I am not aware<br>
if exists in other languages: Use the types of the arguments<br>
in the function call and allow the *compiler* to determine<br>
exactly what version of the function to link with. Works both<br>
internally in classes and for free functions.<br>
<br>
It is an incredibly powerful feature. Once one have tried it,<br>
one will never go back.<br>
<br>
Rune

Sun, 30 May 2010 21:00:07 +0000
Re: Error in MIN and MAX
http://www.mathworks.com/matlabcentral/newsreader/view_thread/283396#750283
dpb
Rune Allnor wrote:<br>
> On 30 Mai, 15:16, dpb <n...@non.net> wrote:<br>
...<br>
>> The min() and max() names are, while possibly could claim they always<br>
>> ought to be minx or miny or somesuch amplified naming convention no<br>
>> matter what seem perfectly reasonable to use as variable names. And, of<br>
>> course, if one comes from Fortran (listening, Rune??? :) ) where<br>
>> function names and variable names are in different name spaces, it's<br>
>> perfectly permissible<br>
> <br>
> So you are saying that it is not the programming language<br>
> but the programmer's experience that determinec what features<br>
> he will be allowed to use in his programs...?<br>
<br>
How do you get that from what I wrote? I simply contrasted the syntax <br>
of Fortran that can from context determine whether MIN() is a function <br>
or array reference and allows both in the same compilation unit whereas, <br>
Matlab, otoh, can't.<br>
<br>
Hence, in Matlab it's the programmer's responsibility to either not use <br>
an existing function name or know that they have aliased it. The <br>
language doesn't do much (as in anything) to help other than if the <br>
particular function is in the syntaxcoloring list; otherwise it's <br>
completely silent.<br>
...<br>
<br>
> This is the strength that C++ offers, which I am not aware<br>
> if exists in other languages: Use the types of the arguments<br>
> in the function call and allow the *compiler* to determine<br>
> exactly what version of the function to link with. Works both<br>
> internally in classes and for free functions.<br>
> <br>
> It is an incredibly powerful feature. Once one have tried it,<br>
> one will never go back.<br>
...<br>
<br>
Yes, that is essentially the rule in resolution of Fortran generic <br>
function prototypes to the specific function call (believe it or not... <br>
:) ). And, yes, it is quite a nice feature, agreed.<br>
<br>


Mon, 31 May 2010 02:16:36 +0000
Re: Error in MIN and MAX
http://www.mathworks.com/matlabcentral/newsreader/view_thread/283396#750303
dpb
Matt J wrote:<br>
> dpb <none@non.net> wrote in message <br>
> <httojr$f0t$1@news.eternalseptember.org>...<br>
> <br>
>> > I'm actually a bit dumbfounded by how often this occurs. If you're > <br>
>> trying to use the same name for two different things (function and > <br>
>> variable), I tend to think that you really don't know what's going on <br>
>> in > your code.<br>
>><br>
>> OTOH, given the size of the ML namespace, in some ways my surprise is <br>
>> it doesn't happen even more often... :)<br>
> <br>
> No, the save of the Matlab namespace is not relevant. It is perfectly <br>
> harmless to use i, j, min, max, etc... as variable names as long as you <br>
> don't then try to use them as functions later on in the same workspace.<br>
> The problem only occurs when people deliberately try to use the same <br>
> name for 2 different things in the same mfile.<br>
<br>
Well, I think the namespace size _does_ have quite a lot to do with it <br>
myself just from the likelihood standpoint of a name collision.<br>
<br>
That aliasing is ok from Matlab syntax standpoint just makes the error <br>
more difficult to catch when it happens.<br>
<br>


Mon, 31 May 2010 07:12:49 +0000
Re: Error in MIN and MAX
http://www.mathworks.com/matlabcentral/newsreader/view_thread/283396#750319
Rune Allnor
On 30 Mai, 23:00, dpb <n...@non.net> wrote:<br>
> Rune Allnor wrote:<br>
> > On 30 Mai, 15:16, dpb <n...@non.net> wrote:<br>
> ...<br>
> >> The min() and max() names are, while possibly could claim they always<br>
> >> ought to be minx or miny or somesuch amplified naming convention no<br>
> >> matter what seem perfectly reasonable to use as variable names. And, of<br>
> >> course, if one comes from Fortran (listening, Rune??? :) ) where<br>
> >> function names and variable names are in different name spaces, it's<br>
> >> perfectly permissible<br>
><br>
> > So you are saying that it is not the programming language<br>
> > but the programmer's experience that determinec what features<br>
> > he will be allowed to use in his programs...?<br>
><br>
> How do you get that from what I wrote?<br>
<br>
Because you said "if one comes from Fortran [...] it permissible..."<br>
but without stating what language you ara discussing. You have worked<br>
with fortran, I have not. Indicating that you could use these<br>
techniques in any other language, wheras I can not.<br>
<br>
It's a ridiculous statement, so I wonder if you really mean it.<br>
<br>
...<br>
> > It is an incredibly powerful feature. Once one have tried it,<br>
> > one will never go back.<br>
><br>
> ...<br>
><br>
> Yes, that is essentially the rule in resolution of Fortran generic<br>
> function prototypes to the specific function call (believe it or not...<br>
> :) ). And, yes, it is quite a nice feature, agreed.<br>
<br>
So they got one thing right. (When did that happen? From the outset<br>
in the early '50s? Some time afterwards? Maybe after C++ demonstrated<br>
the technique's power?<br>
<br>
Too bad, then, that fortran sufferes from just about every other<br>
weakness, flaw and blunder in the book.<br>
<br>
Rune

Mon, 31 May 2010 12:31:45 +0000
Re: Error in MIN and MAX
http://www.mathworks.com/matlabcentral/newsreader/view_thread/283396#750394
dpb
Rune Allnor wrote:<br>
> On 30 Mai, 23:00, dpb <n...@non.net> wrote:<br>
>> Rune Allnor wrote:<br>
>>> On 30 Mai, 15:16, dpb <n...@non.net> wrote:<br>
>> ...<br>
>>>> The min() and max() names are, while possibly could claim they always<br>
>>>> ought to be minx or miny or somesuch amplified naming convention no<br>
>>>> matter what seem perfectly reasonable to use as variable names. And, of<br>
>>>> course, if one comes from Fortran (listening, Rune??? :) ) where<br>
>>>> function names and variable names are in different name spaces, it's<br>
>>>> perfectly permissible<br>
>>> So you are saying that it is not the programming language<br>
>>> but the programmer's experience that determinec what features<br>
>>> he will be allowed to use in his programs...?<br>
>> How do you get that from what I wrote?<br>
> <br>
> Because you said "if one comes from Fortran [...] it permissible..."<br>
> but without stating what language you ara discussing. You have worked<br>
> with fortran, I have not. Indicating that you could use these<br>
> techniques in any other language, wheras I can not.<br>
> <br>
> It's a ridiculous statement, so I wonder if you really mean it.<br>
<br>
_WHAT_??? How else could one think of anything except Matlab as that <br>
was what the subject was about and simply a reference to a user who had <br>
Fortran experience?<br>
<br>
And, what statement is ridiculous in your view and why is it so? I <br>
meant (and still mean) everything I said; there may be a <br>
misunderstanding here, I expect there is.<br>
<br>
...<br>
>>> It is an incredibly powerful feature. Once one have tried it,<br>
>>> one will never go back.<br>
>> ...<br>
>><br>
>> Yes, that is essentially the rule in resolution of Fortran generic<br>
>> function prototypes to the specific function call (believe it or not...<br>
>> :) ). And, yes, it is quite a nice feature, agreed.<br>
> <br>
> So they got one thing right. (When did that happen? From the outset<br>
> in the early '50s? Some time afterwards? Maybe after C++ demonstrated<br>
> the technique's power?<br>
<br>
Well, at that point, did C++ have generic procedures, either? Of course <br>
not.<br>
<br>
It became part of the Standard in the F90 Standard cycle (which is about <br>
20 years ago if you hadn't noticed, so it isn't exactly brand new)...<br>
<br>
> Too bad, then, that fortran sufferes from just about every other<br>
> weakness, flaw and blunder in the book.<br>
<br>
Excepting, of course, that for the most part for scientific computing <br>
higher level programming languages, Fortran wrote the book... :)<br>
<br>
Again, if you didn't know that Fortran has had generic procedures for 20 <br>
years you're demonstrating that your complaints are still 40 years out <br>
of date. At least have _some_ knowledge of that against which you rant.<br>
<br>


Mon, 31 May 2010 12:52:03 +0000
Re: Error in MIN and MAX
http://www.mathworks.com/matlabcentral/newsreader/view_thread/283396#750405
dpb
dpb wrote:<br>
...<br>
<br>
>> Because you said "if one comes from Fortran [...] it permissible..."<br>
>> but without stating what language you ara discussing. You have worked<br>
>> with fortran, I have not. Indicating that you could use these<br>
>> techniques in any other language, wheras I can not.<br>
>><br>
>> It's a ridiculous statement, so I wonder if you really mean it.<br>
> <br>
> _WHAT_??? How else could one think of anything except Matlab as that <br>
> was what the subject was about and simply a reference to a user who had <br>
> Fortran experience?<br>
> <br>
> And, what statement is ridiculous in your view and why is it so? I <br>
> meant (and still mean) everything I said; there may be a <br>
> misunderstanding here, I expect there is.<br>
<br>
...<br>
<br>
OK, it dawned on me where the problem lies...it's in the snipping that's <br>
the clue.<br>
<br>
First, it seemed clear to me that by saying "if one comes from Fortran" <br>
that the implication is that the "where" something is permissible refers <br>
to Fortran syntax/rules. What you snipped was (and is) pertinent in <br>
that it states that Fortran parsing is such that a function reference <br>
and array reference of the same spelling (name) in the same compilation <br>
unit (program/subroutine/function) are discernible from each other <br>
(don't occupy same name space). That was contrasted to the problem <br>
under discussion of Matlab where specifically min() and max() were <br>
aliased by being used a variables hence aliasing the Matlab functions of <br>
the same name. That aliasing wouldn't happen in Fortran even if one <br>
made an array named one of these to hold the columnwise minimums <br>
(although I went on to say I wouldn't consider it good practice to do so).<br>
<br>
That help???<br>
<br>


Mon, 31 May 2010 13:05:04 +0000
Re: Error in MIN and MAX
http://www.mathworks.com/matlabcentral/newsreader/view_thread/283396#750409
Rune Allnor
On 31 Mai, 14:52, dpb <n...@non.net> wrote:<br>
> dpb wrote:<br>
><br>
> ...<br>
><br>
> >> Because you said "if one comes from Fortran [...] it permissible..."<br>
> >> but without stating what language you ara discussing. You have worked<br>
> >> with fortran, I have not. Indicating that you could use these<br>
> >> techniques in any other language, wheras I can not.<br>
><br>
> >> It's a ridiculous statement, so I wonder if you really mean it.<br>
><br>
> > _WHAT_??? How else could one think of anything except Matlab as that<br>
> > was what the subject was about and simply a reference to a user who had<br>
> > Fortran experience?<br>
><br>
> > And, what statement is ridiculous in your view and why is it so? I<br>
> > meant (and still mean) everything I said; there may be a<br>
> > misunderstanding here, I expect there is.<br>
><br>
> ...<br>
><br>
> OK, it dawned on me where the problem lies...it's in the snipping that's<br>
> the clue.<br>
<br>
No, it isn't. It's the statement. The whole excerpt:<br>
<br>
>> if one comes from Fortran (listening, Rune??? :) ) where<br>
>> function names and variable names are in different name spaces, it's<br>
>> perfectly permissible<br>
<br>
You assign the property to the programmer: "If one comes from<br>
fortran..." Somebody who have previous experience with fortran<br>
is permitted to whatever; somebody who does not have that<br>
experience ("does not come from fortran") are denied those<br>
permissions.<br>
<br>
You do *not* say that "In fortran it is permissible to..." which<br>
would make sense.<br>
<br>
Rune

Mon, 31 May 2010 13:42:37 +0000
Re: Error in MIN and MAX
http://www.mathworks.com/matlabcentral/newsreader/view_thread/283396#750422
dpb
Rune Allnor wrote:<br>
> On 31 Mai, 14:52, dpb <n...@non.net> wrote:<br>
>> dpb wrote:<br>
>><br>
>> ...<br>
>><br>
>>>> Because you said "if one comes from Fortran [...] it permissible..."<br>
>>>> but without stating what language you ara discussing. You have worked<br>
>>>> with fortran, I have not. Indicating that you could use these<br>
>>>> techniques in any other language, wheras I can not.<br>
>>>> It's a ridiculous statement, so I wonder if you really mean it.<br>
>>> _WHAT_??? How else could one think of anything except Matlab as that<br>
>>> was what the subject was about and simply a reference to a user who had<br>
>>> Fortran experience?<br>
>>> And, what statement is ridiculous in your view and why is it so? I<br>
>>> meant (and still mean) everything I said; there may be a<br>
>>> misunderstanding here, I expect there is.<br>
>> ...<br>
>><br>
>> OK, it dawned on me where the problem lies...it's in the snipping that's<br>
>> the clue.<br>
> <br>
> No, it isn't. It's the statement. The whole excerpt:<br>
> <br>
>>> if one comes from Fortran (listening, Rune??? :) ) where<br>
>>> function names and variable names are in different name spaces, it's<br>
>>> perfectly permissible<br>
> <br>
> You assign the property to the programmer: "If one comes from<br>
> fortran..." Somebody who have previous experience with fortran<br>
> is permitted to whatever; somebody who does not have that<br>
> experience ("does not come from fortran") are denied those<br>
> permissions.<br>
> <br>
> You do *not* say that "In fortran it is permissible to..." which<br>
> would make sense.<br>
<br>
No, _again_ you judiciously snipped to make your context...<br>
<br>
I said (w/o the aside) "if one comes from Fortran where...". The <br>
"where" immediately follows Fortran so it is clearly referring to the <br>
language and simply it is that one has that as a background that is implied.<br>
<br>
And, of course, even if one were to take your stretched connotation of <br>
it being the programmer, what, pray tell, would set the Fortran <br>
programmer apart from any other if it weren't the syntax rules of the <br>
language from whence his/her experience came? Hence, the same <br>
conclusion must be drawn even under that parsing.<br>
<br>
And, w/ that semantic nitpicking, I'm outta' here on this thread.<br>
<br>
I would simply ask that you just hold the vitriol on Fortran though; it <br>
is clearly simply a visceral kneejerk reaction you were taught at some <br>
point and has no bearing on the current language which you have stated <br>
you know nothing about. There's no point in continuing a feud against a <br>
nolongerpertinent 40yr old target.<br>
<br>
I only respond to set the record straight on what is current as opposed <br>
to the impression you try to leave that all FORTRAN must look like F66 <br>
or perhaps some F77 as that simply is not true.<br>
<br>


Mon, 31 May 2010 14:26:03 +0000
Re: Running checkvars in the background
http://www.mathworks.com/matlabcentral/newsreader/view_thread/283396#750429
Bjorn Gustavsson
"freund@mail.biu.ac.il" <freund@mail.biu.ac.il> wrote in message <2019061764.250670.1275239223055.JavaMail.root@gallium.mathforum.org>...<br>
> Dear Mike,<br>
> <br>
> Is there a way to turn on <checkvars> and have it run in the background until turned off? I<br>
> tested one of my functions that I use all the time by inserting checkvars as the last line,<br>
> and was amazed to find four instances of shadowing that involved three obscure Matlab<br>
> functions such as Zb, and a function that I wrote years ago and had stupidly named G1.<br>
> After the test I decided the shadowing was in these cases innocuous, and deleted<br>
> checkvars. But it is obviously not practical to check all my functions this way. In many<br>
> cases functions are deeply nested, and shadowing could have the potential to produce<br>
> undetected errors. Ideally, checkvars would tell you the name of the mfile and the line<br>
> number.<br>
><br>
Mmaybe you can build something along these lines:<br>
<br>
% At the top of your function:<br>
persistent Checked_for_var_shadowing_yet<br>
<br>
% Then at the end:<br>
if ~exist('Checked_for_var_shadowing_yet')<br>
% want to test for two different calling variants<br>
Checked_for_var_shadowing_yet = [0,0];<br>
end<br>
if ~all(Checked_for_var_shadowing_yet)<br>
<br>
checkvars<br>
% Something based on the input arguments:<br>
if nargin == 3<br>
Checked_for_var_shadowing_yet(1) = 1;<br>
else<br>
Checked_for_var_shadowing_yet(2) = 1;<br>
end<br>
end<br>
<br>
HTH,<br>
Bjeorn

Mon, 31 May 2010 15:06:31 +0000
Re: Error in MIN and MAX
http://www.mathworks.com/matlabcentral/newsreader/view_thread/283396#750443
Rune Allnor
On 31 Mai, 15:42, dpb <n...@non.net> wrote:<br>
<br>
> I would simply ask that you just hold the vitriol on Fortran though;<br>
<br>
So why are you picking the fight in the first place?<br>
<br>
Rune

Mon, 31 May 2010 15:29:31 +0000
Re: Running checkvars in the background
http://www.mathworks.com/matlabcentral/newsreader/view_thread/283396#750452
freund@mail.biu.ac.il
Dear Bjeorn,<br>
<br>
Thanks for the suggestion, which might be OK for new functions, but still leaves the problem of a very large number of old functions that need to be checked.<br>
<br>
Ize

Mon, 31 May 2010 16:18:05 +0000
Re: Running checkvars in the background
http://www.mathworks.com/matlabcentral/newsreader/view_thread/283396#750459
Bjorn Gustavsson
"freund@mail.biu.ac.il" <freund@mail.biu.ac.il> wrote in message <1738720352.255215.1275319801817.JavaMail.root@gallium.mathforum.org>...<br>
> Dear Bjeorn,<br>
> <br>
> Thanks for the suggestion, which might be OK for new functions, but still leaves the<br>
> problem of a very large number of old functions that need to be checked.<br>
> <br>
Well, maybe they aren't _that_ very many? If they are in the 50s you could do it manually. If you have someone skilled in perl or awk or some similar tools I guess you could get that kind of snippet inserted automatically. To cat the "usage" part onto the end of all functions you could do in matlab I'm sure. Take a look at the fex for files that does automatic modifications of mfiles. Should be something for insertion of for example copyright notices or the like.<br>
<br>
HTH,<br>
Bjeorn

Mon, 31 May 2010 16:29:07 +0000
Re: Error in MIN and MAX
http://www.mathworks.com/matlabcentral/newsreader/view_thread/283396#750461
Steve Amphlett
dpb <none@non.net> wrote in message <httmnf$76r$1@news.eternalseptember.org>...<br>
> Steve Amphlett wrote:<br>
> > "Matt Fig" <spamanon@yahoo.com> wrote in message <br>
> > <hts20o$vt$1@fred.mathworks.com>...<br>
> >> It must be a slow day when a masking variable thread stays in the top <br>
> >> 5 for hours on end...<br>
> > <br>
> > I still think it's a huge problem with the Matlab language. A massive <br>
> > boobytrap sitting there, waiting. A bit like Fortran's implicit <br>
> > declaration of missspelled variables ...<br>
> <br>
> "IMPLICIT NONE"<br>
> <br>
> > ... or variables truncated by the 72'nd column cutoff.<br>
> <br>
> freeform source format...<br>
<br>
Ah yes, the "complicit nun". Something many hackers don't initially bother about and stick it in later, having been burned.<br>
<br>
Freeform source format is probably OK if you only have one compiler to worry about. When you have 7 (5 UNIXes, Linux and Windows), you need to code to the lowest common denominator. As recently as 1995, IBM's xlf had no abilty to go beyond the 72'nd column  we had to use a linesplitter to build our freeform source on that platform. Worse, most Fortran compilers don't warn if you forget the switches to allow "extended source", they just truncate.<br>
<br>
I'm with Rune on C++. It is so strongly typed that in general, if it will compile, it will work as planned. The compiler tells you where your mistakes are; you fix them; it works.

Mon, 31 May 2010 17:51:48 +0000
Re: Error in MIN and MAX
http://www.mathworks.com/matlabcentral/newsreader/view_thread/283396#750477
dpb
Rune Allnor wrote:<br>
> On 31 Mai, 15:42, dpb <n...@non.net> wrote:<br>
> <br>
>> I would simply ask that you just hold the vitriol on Fortran though;<br>
> <br>
> So why are you picking the fight in the first place?<br>
> <br>
<br>
I'm only responding when you go off on the diatribe  there was a <br>
little chuckle aside earlier in the thread just for grins but as the <br>
smiley showed, that's all it was.<br>
<br>
You made a response that was reasoned to which I pointed out that <br>
Fortran also has generic procedures. In your response to that you then <br>
went off on the rant. It would have been find w/o that, I can take the <br>
misunderstandings of reading/interpretation but I don't see it as being <br>
fruitful to make such mindless assertions of the shortcomings of FORTRAN <br>
as of 3040 years ago and I'll continue to refute those when made.<br>
<br>
If you'd just stop doing that, I'd be content. If you want to have a <br>
real discussion on the merits of Fortran vis a vis any other language <br>
and the difficulties in implementation of new features while retaining <br>
as much compatibility with prior Standards (or even argue that there's <br>
no place for evolutionary improvement but that every advance has to be <br>
from a totally new design standpoint w/o consideration of existing <br>
codebase), that discussion belongs somewhere else than cssm.<br>
<br>
Certainly there are known issues with implementing new features in <br>
Fortran and I doubt that there is any present or former member of J3 <br>
that thinks that the choices made are universally the best way to have <br>
proceeded even to this point. That some features would have been added <br>
differently if not for that constraint is also true. But, there are <br>
enough people that see the value in existing code and in maintaining <br>
compatibility to that code base that there has been and continues to be <br>
sufficient interest to have released two major Standards (F90 and F03) <br>
and a smaller revision F95 while F2008 is nearing completion/acceptance <br>
voting (or it may already been approved, I'm not exactly sure where in <br>
the cycle it is at the moment). And, obviously, it would be of little <br>
point in doing that if vendors weren't producing compilers implementing <br>
those revised Standards. And vendors are doing so.<br>
<br>
The point being, as I (and some others) have made before, the FORTRAN of <br>
your criticism is NOT the current state of Fortran and by making such <br>
blatantly uninformed pronouncements you're not helping anybody.<br>
<br>


Mon, 31 May 2010 18:49:32 +0000
Re: Error in MIN and MAX
http://www.mathworks.com/matlabcentral/newsreader/view_thread/283396#750497
Rune Allnor
On 31 Mai, 19:51, dpb <n...@non.net> wrote:<br>
> Rune Allnor wrote:<br>
> > On 31 Mai, 15:42, dpb <n...@non.net> wrote:<br>
><br>
> >> I would simply ask that you just hold the vitriol on Fortran though;<br>
><br>
> > So why are you picking the fight in the first place?<br>
><br>
> I'm only responding when you go off on the diatribe  there was a<br>
> little chuckle aside earlier in the thread just for grins but as the<br>
> smiley showed, that's all it was.<br>
<br>
Was it?<br>
<br>
> You made a response that was reasoned to which I pointed out that<br>
> Fortran also has generic procedures. In your response to that you then<br>
> went off on the rant.<br>
<br>
What rant? You made a ridiculous statement and I called you on it.<br>
I don't know why you don't post under your own name, so I can only<br>
guess that your native language is English.<br>
<br>
I can only imagine how it might feel to be taught linguistic<br>
subtleties of your native language by a foreigner half your age.<br>
Is *that* what's bothering you?<br>
<br>
If so, take it up with the guy you see in the mirror. Not me.<br>
<br>
> It would have been find w/o that, I can take the<br>
> misunderstandings of reading/interpretation but I don't see it as being<br>
> fruitful to make such mindless assertions of the shortcomings of FORTRAN<br>
> as of 3040 years ago and I'll continue to refute those when made.<br>
<br>
Who have said anything about fortran as of 40 years ago?<br>
<br>
> If you'd just stop doing that, I'd be content.<br>
<br>
Who have said anything about fortran as of 40 years ago?<br>
<br>
> If you want to have a<br>
> real discussion on the merits of Fortran vis a vis any other language<br>
> and the difficulties in implementation of new features while retaining<br>
> as much compatibility with prior Standards (or even argue that there's<br>
> no place for evolutionary improvement but that every advance has to be<br>
> from a totally new design standpoint w/o consideration of existing<br>
> codebase), that discussion belongs somewhere else than cssm.<br>
<br>
Sure. I have stated very clearly in other threads what<br>
my position on fortran is: Fortran is an obsolete language<br>
that, while of significant hoistorical importance, is<br>
only interesting for its considerable legacy code base.<br>
Youngsters and novices who ask questions here about fortran<br>
ought to be made aware of that fact, and not tricked into<br>
wasting time and effort on long since obsolete languages.<br>
<br>
> Certainly there are known issues with implementing new features in<br>
> Fortran and I doubt that there is any present or former member of J3<br>
> that thinks that the choices made are universally the best way to have<br>
> proceeded even to this point. That some features would have been added<br>
> differently if not for that constraint is also true. But, there are<br>
> enough people that see the value in existing code and in maintaining<br>
> compatibility to that code base that there has been and continues to be<br>
> sufficient interest to have released two major Standards (F90 and F03)<br>
> and a smaller revision F95 while F2008 is nearing completion/acceptance<br>
> voting (or it may already been approved, I'm not exactly sure where in<br>
> the cycle it is at the moment). And, obviously, it would be of little<br>
> point in doing that if vendors weren't producing compilers implementing<br>
> those revised Standards. And vendors are doing so.<br>
><br>
> The point being, as I (and some others) have made before, the FORTRAN of<br>
> your criticism is NOT the current state of Fortran and by making such<br>
> blatantly uninformed pronouncements you're not helping anybody.<br>
<br>
Sure. I have stated very clearly in other threads what<br>
my position on fortran is: Fortran is an obsolete language<br>
that, while of significant hoistorical importance, is<br>
only interesting for its considerable legacy code base.<br>
Youngsters and novices who ask questions here about fortran<br>
ought to be made aware of that fact, and not tricked into<br>
wasting time and effort on long since obsolete languages.<br>
<br>
Others have explained their handson experiences with fortran,<br>
experiences that pretty much coincide with what I observed<br>
with my colleagues who used fortran. The presence of a standard<br>
does not mean much if it is not respected. The presence of a<br>
standard does not mean much if it only rubberstamps everything<br>
that has been done so far. The presence of a standard does not<br>
mean much without a clear philosophy about how to proceed in the<br>
future.<br>
<br>
In case you haven't noticed, I have stated very clearly in<br>
other threads what my position on fortran is: Fortran is an<br>
obsolete language that, while of significant hoistorical<br>
importance, is only interesting for its considerable legacy<br>
code base. Youngsters and novices who ask questions here about<br>
fortran ought to be made aware of that fact, and not tricked<br>
into wasting time and effort on long since obsolete languages.<br>
<br>
Rune

Mon, 31 May 2010 19:34:54 +0000
Re: Error in MIN and MAX
http://www.mathworks.com/matlabcentral/newsreader/view_thread/283396#750507
Walter Roberson
Rune Allnor wrote:<br>
<br>
> Sure. I have stated very clearly in other threads what<br>
> my position on fortran is: Fortran is an obsolete language<br>
> that, while of significant hoistorical importance, is<br>
> only interesting for its considerable legacy code base.<br>
> Youngsters and novices who ask questions here about fortran<br>
> ought to be made aware of that fact, and not tricked into<br>
> wasting time and effort on long since obsolete languages.<br>
<br>
You have indicated that you do not know Fortran, and what you do describe of <br>
it reflects at best the state of Fortran up to 1977 (33 years ago). What <br>
_have_ you studied in this matter that might give people reason to believe <br>
that you are competent to judge this matter?<br>
<br>
<br>
> I can only imagine how it might feel to be taught linguistic<br>
> subtleties of your native language by a foreigner half your age.<br>
> Is *that* what's bothering you?<br>
<br>
One of the aspects of English is that a comma can indicate a pause to catch <br>
one's breath (mentally or physically), which is the way that dpb used in in <br>
his sentence. Using the comma that way is not encouraged in written work, but <br>
it is recognized (especially in connection with transcription of verbal material.)<br>
<br>
English has very few rules that have no accepted exceptions. English was not <br>
"designed": it evolved through a number of cultural clashes, with Latin (Roman <br>
official language), Vulgar Latin (the language of the Roman people), Greek, <br>
Scot, Angle, Saxon, Old Norse, French and German all making marked <br>
contributions to the structure and vocabulary of the language. There is no <br>
standardization body for it, and very few people consciously learn all the <br>
known "rules" (though they may employ the rules without knowing the reasons). <br>
English has been referred to as one of the hardest languages in the world to <br>
learn.

Mon, 31 May 2010 20:22:37 +0000
Re: Error in MIN and MAX
http://www.mathworks.com/matlabcentral/newsreader/view_thread/283396#750518
Rune Allnor
On 31 Mai, 21:34, Walter Roberson <rober...@hushmail.com> wrote:<br>
> Rune Allnor wrote:<br>
> > Sure. I have stated very clearly in other threads what<br>
> > my position on fortran is: Fortran is an obsolete language<br>
> > that, while of significant hoistorical importance, is<br>
> > only interesting for its considerable legacy code base.<br>
> > Youngsters and novices who ask questions here about fortran<br>
> > ought to be made aware of that fact, and not tricked into<br>
> > wasting time and effort on long since obsolete languages.<br>
><br>
> You have indicated that you do not know Fortran, and what you do describe of<br>
> it reflects at best the state of Fortran up to 1977 (33 years ago). What<br>
> _have_ you studied in this matter that might give people reason to believe<br>
> that you are competent to judge this matter?<br>
<br>
I have compared fortran's role as a programming language<br>
with the steam engine: Of significant historical importance<br>
but obsolete by today. Would you accept such a claim about<br>
steam engines from somebody who does not have handson<br>
experience with them?<br>
<br>
If 'yes'  on what grounds?<br>
<br>
> > I can only imagine how it might feel to be taught linguistic<br>
> > subtleties of your native language by a foreigner half your age.<br>
> > Is *that* what's bothering you?<br>
><br>
> One of the aspects of English is that a comma can indicate a pause to catch<br>
> one's breath (mentally or physically), which is the way that dpb used in in<br>
> his sentence. Using the comma that way is not encouraged in written work, but<br>
> it is recognized (especially in connection with transcription of verbal material.)<br>
<br>
Do I have to educate *two* native Englishspeakers on the matter?<br>
Do you comment on my criticism, which from your writings I have no<br>
reason to believe you have read? Or do you catch on to dpb's<br>
misunderstanding of what I criticized him of?<br>
<br>
Commas are irrelevant towhat I criticized in dpb's post. *Read* his<br>
post; contemplate the semantics. Selection of words. Phrasings.<br>
<br>
Again, I have commented extensively on what I reacted on in a<br>
different post, so I won't repeat it here. All it takes is that<br>
you *read* it.<br>
<br>
Rune

Mon, 31 May 2010 20:50:35 +0000
Re: Error in MIN and MAX
http://www.mathworks.com/matlabcentral/newsreader/view_thread/283396#750521
dpb
Rune Allnor wrote:<br>
> On 31 Mai, 19:51, dpb <n...@non.net> wrote:<br>
>> Rune Allnor wrote:<br>
>>> On 31 Mai, 15:42, dpb <n...@non.net> wrote:<br>
>>>> I would simply ask that you just hold the vitriol on Fortran though;<br>
>>> So why are you picking the fight in the first place?<br>
>> I'm only responding when you go off on the diatribe  there was a<br>
>> little chuckle aside earlier in the thread just for grins but as the<br>
>> smiley showed, that's all it was.<br>
> <br>
> Was it?<br>
<br>
You're saying it wasn't? A :) indicated a certain amount of levity <br>
intended afaik...<br>
<br>
>> You made a response that was reasoned to which I pointed out that<br>
>> Fortran also has generic procedures. In your response to that you then<br>
>> went off on the rant.<br>
> <br>
> What rant? ...<br>
...<br>
<br>
_WHAT_ rant....???? [Booklong rantings elided...]<br>
<br>
Whoa, chill, dood!!!<br>
<br>
Sorry if pointing out the interpretation of the sentence bugs you, but <br>
that's a little over the top methinks.<br>
<br>


Mon, 31 May 2010 21:03:46 +0000
Re: Error in MIN and MAX
http://www.mathworks.com/matlabcentral/newsreader/view_thread/283396#750524
Rune Allnor
On 31 Mai, 22:50, dpb <n...@non.net> wrote:<br>
> Rune Allnor wrote:<br>
> > On 31 Mai, 19:51, dpb <n...@non.net> wrote:<br>
> >> Rune Allnor wrote:<br>
> >>> On 31 Mai, 15:42, dpb <n...@non.net> wrote:<br>
> >>>> I would simply ask that you just hold the vitriol on Fortran though;<br>
> >>> So why are you picking the fight in the first place?<br>
> >> I'm only responding when you go off on the diatribe  there was a<br>
> >> little chuckle aside earlier in the thread just for grins but as the<br>
> >> smiley showed, that's all it was.<br>
><br>
> > Was it?<br>
><br>
> You're saying it wasn't? A :) indicated a certain amount of levity<br>
> intended afaik...<br>
<br>
...about as much as a fiveyearold thinks "it was a joke!"<br>
alleviates him after yanking somebody's chain.<br>
<br>
Rune

Mon, 31 May 2010 21:32:04 +0000
Re: Error in MIN and MAX
http://www.mathworks.com/matlabcentral/newsreader/view_thread/283396#750532
Roger Stafford
Rune Allnor <allnor@tele.ntnu.no> wrote in message <cada408f977b4a0baa14a8127eaab547@v18g2000vbc.googlegroups.com>...<br>
> On 31 Mai, 22:50, dpb <n...@non.net> wrote:<br>
> > Rune Allnor wrote:<br>
> > > On 31 Mai, 19:51, dpb <n...@non.net> wrote:<br>
> > >> Rune Allnor wrote:<br>
> > >>> On 31 Mai, 15:42, dpb <n...@non.net> wrote:<br>
> > >>>> I would simply ask that you just hold the vitriol on Fortran though;<br>
> > >>> So why are you picking the fight in the first place?<br>
> > >> I'm only responding when you go off on the diatribe  there was a<br>
> > >> little chuckle aside earlier in the thread just for grins but as the<br>
> > >> smiley showed, that's all it was.<br>
> ><br>
> > > Was it?<br>
> ><br>
> > You're saying it wasn't? A :) indicated a certain amount of levity<br>
> > intended afaik...<br>
> <br>
> ...about as much as a fiveyearold thinks "it was a joke!"<br>
> alleviates him after yanking somebody's chain.<br>
> <br>
> Rune<br>
<br>
Hey, Rune and dpb, how about declaring a truce? You are both great guys and it seems a shame that two such experienced individuals as yourselves who have each contributed so much to people asking for help on this newsgroup should waste so much energy engaging in this particular disagreement. I predict that if you do, by tomorrow after the ruffled feathers have been smoothed out, it will all seem like a waste of time to each of you.<br>
<br>
I admit there have been times when I managed to get riled up over issues in this and other groups, but in the long run it is surely selfdefeating to carry disagreements beyond a certain point. Remember the warning that is posted above each post entry which reads, "Your message will be read by thousands of MATLAB users worldwide." I would add that these CSSM threads are also read by quite a few other people throughout the world who are not CSSM subscribers.<br>
<br>
Roger Stafford

Mon, 31 May 2010 22:00:42 +0000
Re: Error in MIN and MAX
http://www.mathworks.com/matlabcentral/newsreader/view_thread/283396#750536
Walter Roberson
Rune Allnor wrote:<br>
<br>
> I have compared fortran's role as a programming language<br>
> with the steam engine: Of significant historical importance<br>
> but obsolete by today. Would you accept such a claim about<br>
> steam engines from somebody who does not have handson<br>
> experience with them?<br>
> <br>
> If 'yes'  on what grounds?<br>
<br>
I would only consider accepting such a claim from someone who had studied <br>
steam engines enough to know their strengths and weaknesses. Especially as <br>
steam engines are not obsolete today, though they are not as common as they <br>
once were. Different applications have different needs.<br>
<br>
You have not even claimed to have studied programming language design or <br>
computing theory.<br>
<br>
<br>
I work in scientific research, currently on building experimental programs for <br>
which efficiency and generality and extendability and maintainability is not <br>
as important as the practical matter of getting something working. We do the <br>
infrastructure development in Matlab because it is a decent prototyping <br>
language. The parts where speed are important get done in C or C++ or Fortran.<br>
<br>
The process of development of scientific ideas does not consider ability of <br>
the average human to understand the source to be overly important, at least <br>
not for the work of small teams  after all, the average human (and average <br>
programmer) would not understand the math or science anyhow. Get an idea <br>
implemented and test it out: when the 95% of ideas that don't work or don't <br>
work better enough to bother have been weeded out, *then* it is time to worry <br>
about longer term goals. That doesn't mean that we write needlessly messy code <br>
 but it does mean that we recognize the value of multiple tools and use <br>
whatever is best suited at the time for getting something accomplished.<br>
<br>
<br>
> Do I have to educate *two* native Englishspeakers on the matter?<br>
> Do you comment on my criticism, which from your writings I have no<br>
> reason to believe you have read? Or do you catch on to dpb's<br>
> misunderstanding of what I criticized him of?<br>
> <br>
> Commas are irrelevant towhat I criticized in dpb's post. *Read* his<br>
> post; contemplate the semantics. Selection of words. Phrasings.<br>
<br>
I read his posts; I read your posts. You assume words that are not present. I <br>
understood his meaning immediately, the first time I read his words.

Mon, 31 May 2010 22:25:19 +0000
Re: Error in MIN and MAX
http://www.mathworks.com/matlabcentral/newsreader/view_thread/283396#750539
us
"Roger Stafford" <ellieandrogerxyzzy@mindspring.com.invalid> wrote in message <hu19sj$e4b$1@fred.mathworks.com>...<br>
> Rune Allnor <allnor@tele.ntnu.no> wrote in message <cada408f977b4a0baa14a8127eaab547@v18g2000vbc.googlegroups.com>...<br>
> > On 31 Mai, 22:50, dpb <n...@non.net> wrote:<br>
> > > Rune Allnor wrote:<br>
> > > > On 31 Mai, 19:51, dpb <n...@non.net> wrote:<br>
> > > >> Rune Allnor wrote:<br>
> > > >>> On 31 Mai, 15:42, dpb <n...@non.net> wrote:<br>
> > > >>>> I would simply ask that you just hold the vitriol on Fortran though;<br>
> > > >>> So why are you picking the fight in the first place?<br>
> > > >> I'm only responding when you go off on the diatribe  there was a<br>
> > > >> little chuckle aside earlier in the thread just for grins but as the<br>
> > > >> smiley showed, that's all it was.<br>
> > ><br>
> > > > Was it?<br>
> > ><br>
> > > You're saying it wasn't? A :) indicated a certain amount of levity<br>
> > > intended afaik...<br>
> > <br>
> > ...about as much as a fiveyearold thinks "it was a joke!"<br>
> > alleviates him after yanking somebody's chain.<br>
> > <br>
> > Rune<br>
> <br>
> Hey, Rune and dpb, how about declaring a truce? You are both great guys and it seems a shame that two such experienced individuals as yourselves who have each contributed so much to people asking for help on this newsgroup should waste so much energy engaging in this particular disagreement. I predict that if you do, by tomorrow after the ruffled feathers have been smoothed out, it will all seem like a waste of time to each of you.<br>
> <br>
> I admit there have been times when I managed to get riled up over issues in this and other groups, but in the long run it is surely selfdefeating to carry disagreements beyond a certain point. Remember the warning that is posted above each post entry which reads, "Your message will be read by thousands of MATLAB users worldwide." I would add that these CSSM threads are also read by quite a few other people throughout the world who are not CSSM subscribers.<br>
> <br>
> Roger Stafford<br>
<br>
i fully second roger's reply...<br>
<br>
most seasoned senior CSSMers duane bozarth and rune allnor:<br>
PLEASE(!!!!!)...<br>
shake hands and go on with a smile...<br>
<br>
urs

Tue, 01 Jun 2010 18:06:12 +0000
Re: Error in MIN and MAX
http://www.mathworks.com/matlabcentral/newsreader/view_thread/283396#750771
Steven Lord
<br>
"Matt J " <mattjacREMOVE@THISieee.spam> wrote in message <br>
news:htrmdk$rcn$1@fred.mathworks.com...<br>
> "Matt J " <mattjacREMOVE@THISieee.spam> wrote in message <br>
> <htrlad$im4$1@fred.mathworks.com>...<br>
><br>
>> Then, as the first line of code in the file, add<br>
>><br>
>> myMin=@min;<br>
><br>
> Make that<br>
><br>
> myMin=eval('@min'); %a deliberately horrible use of eval<br>
<br>
Or you can avoid EVAL:<br>
<br>
myMin = str2func('min');<br>
<br>
Or you can force MATLAB to invoke the builtin MIN function:<br>
<br>
myMin = @(x) builtin('min', x);<br>
<br>
But the easiest way to avoid this problem is not to try to use an identifier <br>
as both a function and a variable. I understand it can be difficult to <br>
remember in a very long program whether you've used a particular identifier <br>
already. One solution to that is to avoid writing very long programs and <br>
instead to write functions that fit on one or two pages and invoke each <br>
function in turn.<br>
<br>
 <br>
Steve Lord<br>
slord@mathworks.com<br>
comp.softsys.matlab (CSSM) FAQ: <a href="http://matlabwiki.mathworks.com/MATLAB_FAQ">http://matlabwiki.mathworks.com/MATLAB_FAQ</a><br>
To contact Technical Support use the Contact Us link on <br>
<a href="http://www.mathworks.com">http://www.mathworks.com</a>

Tue, 01 Jun 2010 18:18:06 +0000
Re: Error in MIN and MAX
http://www.mathworks.com/matlabcentral/newsreader/view_thread/283396#750773
Steven Lord
<br>
"Matt Fig" <spamanon@yahoo.com> wrote in message <br>
news:hts20o$vt$1@fred.mathworks.com...<br>
> It must be a slow day when a masking variable thread stays in the top 5 <br>
> for hours on end...<br>
<br>
Well, the fact that the original post in this thread was posted on the <br>
Saturday of a threeday holiday weekend in both the US (Memorial Day; see <br>
<a href="http://en.wikipedia.org/wiki/Memorial_Day">http://en.wikipedia.org/wiki/Memorial_Day</a>) and the UK (Spring Bank Holiday; <br>
see <a href="http://en.wikipedia.org/wiki/Bank_holiday">http://en.wikipedia.org/wiki/Bank_holiday</a>) may have something to do with <br>
that.<br>
<br>
 <br>
Steve Lord<br>
slord@mathworks.com<br>
comp.softsys.matlab (CSSM) FAQ: <a href="http://matlabwiki.mathworks.com/MATLAB_FAQ">http://matlabwiki.mathworks.com/MATLAB_FAQ</a><br>
To contact Technical Support use the Contact Us link on <br>
<a href="http://www.mathworks.com">http://www.mathworks.com</a>