Re: Matlab -- Venting, Plus Miscellaneous Questions




"Richard Fateman" <fateman@xxxxxxxxxxxxxxx> wrote in message
news:8tGKf.35969$H71.5710@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Steven O:

It seems to me you should complain to the instructor who told
the class to use Matlab. He/she obviously does not have a problem
with asking you to learn a significant number of commands.

You, on the other hand, want to be able to do your numerical
mathematics on something like an IPod.

Discussing your view with your instructor, instead of venting here, might
have produced something more valuable to you, your class, and your
instructor.

I personally find the interaction between the symbolic and "other"
parts of Mathlab to be unnecessarily clumsy. I think I've informed
Steven Lord about them; I think that deep in your intemperate
message you have hit on one or two such points. I don't expect
these to change as long as Matlab takes the view that all of
mathematics is a specialization of a matrix, rather than all of
mathematics is a specialization of a symbolic expression.

I believe that has been Cleve Moler's view since at least when he wrote the
original MATLAB. He discusses some of his inspirations for creating MATLAB
in this article from our News & Notes newsletter:

http://www.mathworks.com/company/newsletters/news_notes/clevescorner/dec04.html

After all, MATLAB stands for MATrix LABoratory.

This makes it illegal to do this( at least in the last Matlab I tried)

sym(x)+1 --- because 1 is a 1X1 matrix, and sym(x) is a symbolic x
and they are incompatible.

Assuming either that x is defined before you execute that call (in which
case the result is a sym object that contains the symbolic representation of
x+1) or that you pass the string x into the sym function (in which case the
result is 1 plus the variable x), that works and has for quite some time --
at least as long as I've been using MATLAB.

z = sym('x')+1
a = 2;
b = sym(a)+1

returns:

z =
x+1

b =
3

where both z and b are symbolic objects.

You must do
sym(x)+sym(1)

The (to me) trivial solution in Matlab's overloaded object-oriented
command language is to allow for + operating on <symbol,other> to
convert other -->symbolic expression, and then add.

That is how it is done.

For some reason this is not allowed. Similarly, flags that might make
sense in the
symbolic part and the numeric part do not, apparently, communicate.

Do you have some examples of flags that you think would make sense to have
communicate? The DIGITS function that I mentioned in my reply as being part
of the toolbox exists because there's no equivalent capability for numeric
variables -- calculations on double precision variables are performed using
IEEE double precision arithmetic.

Whether these are glitches in implementation or (un?)thoughtful design
decisions is hard to tell.

If you, or anyone else, see something where you're not sure which of those
it is or you're not sure it's behaving correctly, let us know either by
contacting technical support or by using the form whose URL I posted in my
previous message (which I've copied here for easy reference.)

http://www.mathworks.com/support/contact_us/ts/ebd/enhance_bug_doc_1.html

--
Steve Lord
slord@xxxxxxxxxxxxx


.



Relevant Pages

  • Re: need help fast
    ... instructor on how to implement things in Matlab. ... As your instructor told you, ... > · ... > H Initial height h of vortices above runway, ...
    (comp.soft-sys.matlab)
  • Re: Matlab -- Venting, Plus Miscellaneous Questions
    ... the class to use Matlab. ... mathematics on something like an IPod. ... Discussing your view with your instructor, instead of venting here, might ... mathematics is a specialization of a symbolic expression. ...
    (sci.math.symbolic)
  • specgram6.2/spectrogram7.1
    ... While 'specgram' in MATLAB version 6.2 showed a partially wrong but highly ... lacking gradual transition between constant frequency and constant time has ... mathematics seems still to suffer ... Naive set theory and Hilbert space are ...
    (comp.soft-sys.matlab)
  • Re: Introducing CAS To Engineers (was Mathamatica vs MATLAB)
    ... Richard Fateman disagrees with my suggestion that swelling Matlab ... with symbolics could degrade its performance. ... > to mimic what humans doing mathematics might do. ... where math plays *some* role... ...
    (sci.math.symbolic)
  • Re: What are the Advantages of Using This Software in Teaching Math?
    ... teaching Mathematics especially to High School Students. ... that you should consider looking at Mathcad in preference ... to Matlab. ...
    (comp.soft-sys.matlab)