02-27-2013 07:17 AM
count from 0 to 9
how to count from 0 to 5?
02-28-2013 04:45 AM
You just need to put 5 instead of 10 in the first while loop.
🙂
If there is any other question just shoot.
Regards,
Hossein
03-06-2013 08:48 AM
to be attached VI and his Sub VI who can generate a 2D matrix with defined inputs number of rows number of columns and range of random numbers?
03-06-2013 10:10 AM - edited 03-06-2013 10:18 AM
strunf,
Are you asking how to do it or are you showing it?
I think you are asking, so I will create an example..
Since you did not mention type, I will assume that it is dbl because of random numbers.
03-06-2013 10:19 AM
I ask how to do it
if you can with explanation please
03-06-2013 10:33 AM - edited 03-06-2013 10:37 AM
This is a very simple implementation. A better version would first initialize the array. But if you are dealing with a relatively small size (eg: 100 X100), then I would not be too concerned with it.
The outer For loop takes care of the rows while the inner For loop takes care of the columns. The range difference is multiplied by the random number and added to the lower range. This should be obvious..
You can drag or copy this snippet directly into your block diagram and it will become code.
03-06-2013 11:32 AM
Thanks
if you can make this code to be instead of (for loop) in the (WHILE-LOOP) stops work when you detect the last character in the string
03-06-2013 12:32 PM - edited 03-06-2013 12:37 PM
Can you explain what you are trying to do? I can make LabVIEW do just about anything, but it is usless if it's not what you want..
Are you trying to extract the last character of a string? If so, you do not need any loop to do that.
What are you trying to do?
What's up with a,e,i,o,u. Sounds like "voyelles" in french. Do you need to count how many times they appear?
03-06-2013 12:44 PM
must stand on the last string.
but we need to do all that code to work in the WHILE-LOOP.
the professor is in FOR-LOOP, said to do the same only in the WHILE-LOOP.
03-06-2013 12:55 PM
I don't want to give you the answer because I would be doing your homework. 😉
I will give you hints:
What causes the decision to stop a While Loop for this example? What can you use?