[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
## Help with functions

**From**: |
Fausto Arinos de A. Barbuto |

**Subject**: |
Help with functions |

**Date**: |
Thu, 17 Jul 2003 20:50:56 -0600 |

Hello,
Maybe I am too new to Octave, maybe I should read the 356-page
manual carefully or maybe I'm too dumb. Or all the above. :-) However,
I have a question and thought you might help me.
In Octave, if I do:
>> t = 0:0.01:2*pi
>> y = exp(-2.0*t)
>> z = cos(t)
>> plot (t, y, t, z)
I get two nicely done plots of sin and cosine functions. However,
if I do:
>> t = 0:0.01:2*pi
>> y = exp(-2.0*t)
>> z = cos(t)
>> plot (t, y*z)
all I get is an error. I figured out already why this happens; it is
because "y" and "z" are arranged in 1xN matrices and the multiplication
of 1xN (N not equal to 1) by another 1xN matrix is not possible. Very
well. But then I am stuck. How do I plot a map of the exp(-2*t)*cos(t)
function? Defining w = exp(-2.0*t)*sin(t) doesn't help, either.
The obvious question is then: how do I do that?
Many thanks in advance!
---Fausto

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.500 / Virus Database: 298 - Release Date: 10/07/2003

**Help with functions**,
*Fausto Arinos de A. Barbuto* **<=**