Community Profile

photo

George


Stockton State College

Active since 2012

Statistics

  • Thankful Level 1

View badges

Content Feed

View by

Question


how can i specify to take the middle digits of a string?
like if i have 426,692,449,089, i need a variable to assume the value of 692,449, it could also be 653217, i would need...

11 years ago | 1 answer | 0

1

answer

Question


if i have a counter how would i specify that every time the counter goes up in increments of 1 to execute a command ?
specifically how to make this for loop take the cars in queue(or at the red light)and have them go clc %This code made me l...

11 years ago | 1 answer | 0

1

answer

Question


how do i create a loop that generates random numbers in between .5 and five seconds(.5+4.5*rand), that accumulates up to 60 seconds then resets back to zero seconds for 120 times
I have been trying to do this for two days and have a cluster f of variables which in the end doesn't work. I also need a separa...

11 years ago | 1 answer | 0

1

answer

Question


if i have a for loop doing iterations based on random intervals of time between .5-5 seconds, how do i keep track of that time?
for i=1:60; x=(.5+4.5*rand)+x; how do i figure out how much time went by during these 60 iterations?

11 years ago | 1 answer | 0

1

answer

Question


How do you get Matlab to return a value for how many 1's are in a vector containing just 1's and zeros
Like if i have greencars=[11111111000000000000] how to i get Matlab to count how many ones there are?

11 years ago | 4 answers | 0

4

answers