How to define funcs with vars and eval?

  • David M. Karr

    David M. Karr - 2009-02-16

    From what I saw of the snapshots of Qalculate, I assumed that I would have the ability to  interactively enter different arithmetic functions that reference user-defined variables, and then interactively evaluate those functions with different values for those variables. I can't figure out how this works. I browsed through the docs, but I couldn't figure it out from that.

    • Nobody/Anonymous

      I found out how to do so, but it was not really obvious.

      In fact you have to define your function by the menu "Edit > manage functions"

      And when you give the expression of your function, don't forget the \ before each unknown.

      For example, with f defined as:
      you can't get the value of f(20), it is interpreted as f().20

      But if you define f with this expression:
      then you get f(20) easily.

      I assumed this limitation has some interess but it seems anti-natural to me, and the most surprisin,g is that with the first expression, you can get the derivate , the extremums, ... I.e. qalculate unterstands the function, but the syntax problem prevents you to get a particular value .

      Anyhow qalculate seems a great tool to me, very intuitive most of the time.
      But a tutorial, with a list of simple manipulations explained step by step, could be a very big plus.

      I know I can create myself to contribute, but I know this soft for two hours now, so I'm not able yet do create an interesting document.


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks