How to evaluate functions in a list ?

Download0091 shared this question 5 years ago
Answered

Hello,


I have a list of functions, for instance


    V = {0.2x - 3y = 7, 2x - 7y = 5}

I would like to evaluate all the functions in the list for a given value of x, say for instance x = 1. I would like to do this using a Sequence statement. Is this possible ?


Thank you for your help,


John.

Comments (9)

photo
1

The List commands may of some assistance. There are several, click on the link.


Tony

photo
1

Hello John


in environnement GGb, you have a list of lines


Hi Noel,


Yes, I put a list of lines for simplicity's sake. I could have any kind of function in the list. Are you suggesting a solution that I am not seeing ?


John

photo
1

Hi Noel,


That is great. How do I do that in the Algebra View ?

photo
1

Hi Noel,


Thank you.


Ideally, I'd like something that I can feed to a Sequence command. What you mentioned made me think of an alternative, instead of defining the function variable as x, I could define it as a (a plain number) then change the value of a resulting in the functions being automatically evaluated. That's pretty close to the Substitute command you showed previously which would be very nice to have in the Algebra View.

photo
1

hello

saludos

https://ggbm.at/2581043

photo
1

Hello mathmagic,


Perfect! That will work like a charm :-)


Thank you! Muchissimas gracias otra vez!


Saludos,


John.

photo
1

This is what I was talking about. Simple example. Select function from drop down.


Tony

https://ggbm.at/2581523

photo
1

Hi Tony,


Thank you. That is nice and I would use it if I could. I appreciate it.


The problem is that I have to evaluate the values in a script, I cannot have user intervention such as selecting a function from the list. The function to be used is calcuated from a list of functions then those functions need to be evaluated at certain points. All of that in a Sequence command that goes through the whole list.


John.

photo
1

That might be possible by adding values for the coefficients using random numbers.


Tony

© 2021 International GeoGebra Institute