 |
|
List Archives > 
Mathcad List Archive > 
Archive by date > 
This Month By Date > 
This Month By Topic
[mathcad] Vectors in an function
| [mathcad] Vectors in an function |
|
Author: Chris Wilkinson
Posted: Mon, 15 Sep 2003 10:27:16 -0400
|
Hello All
If x is a vector and I write exp(-x) I get a vector result. If I write
t*exp(-t) I get a single number. I presume what is happening is that since x
and exp(-x) are both vectors, the '*' operator returns the dot product ie
sum of the products of the elements.
Now consider f(a)=a*exp(-a). I would expect that if x is a vector, f(x)
would return a vector but it doesn't it returns a scalar. So it seems that
the whole vector is passed inside the function rather than element by
element.
What I need is some way to write the function to evaluate element by element
instead of the default way. I thought that the vectorize operator would do
that but it doesn't.
Any ideas?
Best Regards
Chris Wilkinson * Senior Research Scientist
CALCE Electronics Products and Systems Center * 3200 Martin Hall
University of Maryland * College Park * MD * 20742 * USA
Tel 1 301 405 4563, Fax 1 301 314 9269
---
The Mathcad List - Discussion, Support & News
Contributions: />
Hosted by: Adept Scientific http://www.adeptscience.com
List Archive: http://lists.adeptscience.co.uk/
---
Would you like this to come to a different email address?
---
Simply leave the mailing list (see below) and re-join by
sending a blank email from the new address to:
or
---
If you do not want to be on the Mathcad list, simply send a
blank email (no subject or message needed) to:
/>
|
Previous by date: [mathcad] RE: Import text file to MathCAD 8 worksheet, Pergande, Albert N
Next by date: [mathcad] Re: Vectors in an function, Richard Jackson
Previous thread: [mathcad] RE: Import text file to Mathcad 8 worksheet, Colonna De Lega, Xavier
Next thread: [mathcad] Re: Vectors in an function, Richard Jackson
|
|
|