Hallo,

I am currently working on an app for calculating zeropoints for my students using numerical methods.

I started with the Bisection Method Algorithm.

It currently works with a procedure with a fixed mathematical function f(x)=x*x-2

I would like to enter the function in a text box (example: x*x-2) and then the content of the text box should be converted into a function.

Are there any ideas for this?

And here the aia file:

NumVerfahren.aia (28.7 KB)

To test:

a=0

b=6

Epsilon=0.0001

Greeting Frank

TIMAI2
2
Sounds like you want this:

Thank you TimAI2 for your tip.

Property the extension merged. Unfortunately I don't know how to enter the function as a string.

How do I have to format the string so that f(x)=x*x-2 is calculated with x=3?

The result f(3) must then be 7.

Frank

TIMAI2
4
Use a result procedure

Of course, you can just use the built-in maths blocks for this:

Thanks, that's not my problem.

I want to use a string from a text box as a function for calculation.

The user enters the function in the text box and the app can calculate with this function.

Frank

TIMAI2
6
OK, there will need to be some text manipulation for that. Give a me a couple of minutes.

Thank you so much TimAI2.

This works perfectly now.

Here is the current aia file:

NumVerfahren.aia (524.4 KB)

My thanks also go to Taifun for providing the extension.

Frank

1 Like

Another way with no extension:

4 Likes