[gradsusr] help Using Mathematical Function

Heiner Körnich heiner at misu.su.se
Tue Apr 6 10:03:42 EDT 2010


Hej Joao,

I think the problem is that the log-function is defined within the
grads-commands, but not within the script-commands, ie. you can use it in a
script within two apostrophes but not without.

Try this:
'd log('pres')'
logpp=subwrd(result,4)

result is a script variable which contains the output from the
grads-command. it looks like:
Result value = 4.60517
 The subwrd picks the 4th word of "result"

Regards till Johannes!

Cheers,
Heiner

2010/4/6 João Teixeira <a38978 at ua.pt>

> Hi there
>
> I've been trying to use the mathematical function, log( ), in one of my
> scripts, but GrADS always tells me that the function doesn't exist. Have any
> of you know how to use this mathematical function in the scripting language?
> In attachment I send the script.
>
> Cheers
> João Teixeira
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
>


-- 
Heiner Körnich
Dept. of Meteorology            Tel:  +46 8 164333
Stockholms University, SE-106 91 Stockholm, Sweden
Email: heiner at misu.su.se   www.misu.su.se/~heiner/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20100406/97128f2c/attachment-0003.html 


More information about the gradsusr mailing list