Get everyone opinion .
What would be the best way to design this math requirement.
I basically have to produce and array of values from 10.00, 10.01, 10.02 ,.......... 15.00 for for some type of array which will be X values. Then after I have produce the array from 10.00 nano meter to 15.00 . I have to use those X array values to produce Y array values from an equation. I am going to make up an equation below. I ultimately want to be able to any range using any number in, and the logic just out put range into an array, so i can use the x values to produce and array of Y values. Review below. I can use list, dictionary, struct etc... but will will be the best way to produce range of values using any two set of numbers
Find Y values from a of range 10.00 to 15.00 nano meters.
Y = X + 3
Example: Y is my output.
X | Y
-----------------
10.00 | 10.03
10.01 | 10.04
10.02 | 10.05
10.03 | 10.06
15.00 | 15.03
Loading
David SmithPosted Dec 12, 2011, 11:05 PM
Find Y values from a of range 10.00 to 15.00 nano meters. I am asking how to produce the logic. There will be over two hundred values. The limit is from 10.00 to 15.00
Y = X + 3
Example: Y is my output.
X | Y
-----------------
10.00 | 10.03
10.01 | 10.04
10.02 | 10.05
10.03 | 10.06
15.00 | 15.03
Sam HobbsPosted Dec 12, 2011, 9:15 PM
I think your question is not clear; I do not know if you are asking how to produce the data or how to use the data. Those are two diferent things and you seem to be asking both.
Do you have an estimate of how many there will be? If there are only a few then it is not worth using a Dictionary but it would not be a problem if you did. If there will be a few thousand then you certainly would want to use a Dictionary or some collection like that. If there will be only one Y value for each X value then as best as I understand what you need you will not have a need for a struct.
Of course, knowing you, there are more requirements (many members often forget all the requirements for the initial question) so please explain what you need that I do not understand.
Is this for the diagnostics for the Mars Rover you are building?