# Notation question: $x\ln^2(1000/y)$ into MATLAB

I've been tasked with working out how much some incorrectly entered calibration coefficients have affected some measurements we've taken. I have the algorithm used, which I can use to work backwards and get some error ranges, but I'm a bit stuck on notation.

$x\ln^2(1000/y)$

but I'm a but flummoxed on how to translate this into, say, MATLAB syntax - especially the $\ln^2$ part.

Sorry for the stupid question, but this is out of my field a fair bit, and high school maths class was a long time ago...

-
Matlab uses $\log$ to represent the natural log function. If you know the values of $x$ and $y$, then it is easy to evaluate the expression in question. Do this is matlab: x*(log(1000/y))^2. – Nana May 6 '11 at 2:24
Thanks to both Gustav and Nana for the prompt replies. I had some test values I could put in, and I got the correct result from the algorithm. – Caligari May 6 '11 at 2:44

My guess is x * log(1000/y)^2.

Basic functions sometimes put powers of two before the parentheses. It's a common practice for trigonometric functions, even though I can't recall seeing it for ln.

-

I would like to add that if you need to work on a vector value of x and y you will have to put a "dot" before the ^2

x.*(log(1000/y)).^2

This reads "preform the operation of squaring on every component of x and y separately"

-