01-25-2024 10:12 AM
Hello. I have a question how i can build dynamically array of specific size and specific numbers? For example, array with numbers from 70 to 40. SO it will be decremented by 1. Thank you
01-25-2024 10:15 AM
"Ramp Pattern" is a handy function for equally spaced values.
01-25-2024 11:14 AM
@Lily3000 wrote:
Hello. I have a question how i can build dynamically array of specific size and specific numbers? For example, array with numbers from 70 to 40. SO it will be decremented by 1. Thank you
First you need to define what "dynamically" means.
Since you only mention integers, I assume you are talking about "blue values", so a simple FOR loop is sufficient and you can calculate your desired ramp based on your range boundaries with simple math. Often you don't even need to build an array, but simply calculate the derived value inside the loop based on [i] for immediate consumption. :D.
(The mentioned "ramp patters" will give you DBL that could be useful in different scenarios, but not here)
01-25-2024 11:38 AM - edited 01-25-2024 11:41 AM
01-26-2024 08:15 AM
I want to create an array with specific values and then feed them 1 by 1 as a duty cycle of my motor.
01-26-2024 08:55 AM
What are those specific values?
where you will get (Array Constants/From File)?
You use Loops and Start Indexing the elements from 0...N)
Mind to share the Code you have tried....
01-27-2024 12:45 AM
@LilySamchuk wrote:
I want to create an array with specific values and then feed them 1 by 1 as a duty cycle of my motor.
Is this related to the earlier post above or a new question?