help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

multiplying variables


From: Varrun Ramani
Subject: multiplying variables
Date: Wed, 3 Feb 2010 10:03:11 +0530

Hi

I need to plot a graph of a function
H(p) = p log2 (p)

So in matlab i wrote it as
p = (0.1:0.1:1.0)
h = p * log2 (p)

But this gives the error
error: operator *: nonconformant arguments (op1 is 1x10, op2 is 1x10)
error: evaluating binary operator `*' near line 3, column 6
error: evaluating assignment _expression_ near line 3, column 3

How can i express h ?
--
Thanks & Regards
Varrun Ramani
Amrita University '10
Web: varrunr.wordpress.com

reply via email to

[Prev in Thread] Current Thread [Next in Thread]