sjkim0329 Posted October 21, 2008 Report Share Posted October 21, 2008 Hi, guys I'm trying to generate 10,000 point random number array then calculate some basic statistics. I wanted to start with only 10 numbers to see if my programming is working first. I was able to generate random numbers using for loop(N=10). So random numbers were multiply by scaling factor of 100. then I have random array in the front panel. Next step, I tried to calculate max and min so I've used array max&min but according to number indicator i have connected, values are wrong. I don't think I'm putting all the numbers in array correctly. Anybody has suggestions what i'm doing wrong here? I've just started using labVIEW so I'm really new to this program. So please understand if I'm asking basic stuff. I read manuals and bunch of other stuffs but I wasn't able to figure it out. Thank you guys. Quote Link to comment
Dan DeFriese Posted October 21, 2008 Report Share Posted October 21, 2008 Try this example. Let me know if this is helpful. ~Dan Quote Link to comment
sjkim0329 Posted October 21, 2008 Author Report Share Posted October 21, 2008 Thank you Dan. That helped a lot. I had one more question. When I tried to find sample mean and sample variance it gives me an error. It says array element conflict. I know my random array is 1-D. Is there any other way I can calculate sample mean and sample variance? It doesn't have problem calculating just mean and variance. Thanks. Quote Link to comment
Dan DeFriese Posted October 21, 2008 Report Share Posted October 21, 2008 QUOTE (sjkim0329 @ Oct 19 2008, 10:20 PM) When I tried to find sample mean and sample variance it gives me an error. What do you mean by error. Can you post your example? Quote Link to comment
sjkim0329 Posted October 21, 2008 Author Report Share Posted October 21, 2008 this is just like ur example but I added sample variance there. Quote Link to comment
Dan DeFriese Posted October 21, 2008 Report Share Posted October 21, 2008 QUOTE (sjkim0329 @ Oct 19 2008, 10:43 PM) this is just like ur example but I added sample variance there. Sorry, I don't have LV8.6 yet can you do a "File -> Save for Previous Version" to 8.5 or earlier and re-submit? Quote Link to comment
sjkim0329 Posted October 21, 2008 Author Report Share Posted October 21, 2008 QUOTE (Dan DeFriese @ Oct 20 2008, 04:51 AM) Sorry, I don't have LV8.6 yet can you do a "File -> Save for Previous Version" to 8.5 or earlier and re-submit? Quote Link to comment
Dan DeFriese Posted October 21, 2008 Report Share Posted October 21, 2008 Try this... I think you just need to use a different function. Quote Link to comment
sjkim0329 Posted October 21, 2008 Author Report Share Posted October 21, 2008 thanks dan. you've been great helps so far. I feel like I learning this program, step by step. I was trying this case structure having counter. Basically, counting number of times the random number is greater than the mean. I thought I got all the logics and circuits correct but im just stuck at case structure here. and counter just stays at 1. any thoughts? Quote Link to comment
Dan DeFriese Posted October 21, 2008 Report Share Posted October 21, 2008 Hey SJ, I'm a little a little concerned at this point and not really sure what your trying to accomplish. It kinda sounds (and looks) like you need help with your homework... Which is fine by me as long as I'm "helping" and not playing proxy. If I do the work for you, I also do the learning (I never took statistics, so again, this is fine by me ), but you'll get left out in the end. So before we continue please think through your work using pseudo code and repost. I suspect that by doing so you'll be able to answer most, if not all, of your own questions. LAVA and I will be around if you really get stuck, however, we can't do the work for you. ~Dan Quote Link to comment
sjkim0329 Posted October 21, 2008 Author Report Share Posted October 21, 2008 I understand, Dan. You're right. My knowledge towards programming is poor. But I've been trying hard to learn. So I think I almost got this here. I've been researching online trying to figure this out. I've looked at some example codes from NI but not much of help though. Here is what I have so far. I tried with only 10 numbers to see if it was actually counting correctly, sometimes it does and sometimes it doesnt. I looked back my circuit and it seems all make sense. What do you guys think? Dan, I got it.I think they were working just fine. When everytime random number is generated, mean changes. I was just comparing the mean at the end of the program to each random numbers. Thank you for all your help, and I'll keep you advise in mind in the future at LAVA. QUOTE (Dan DeFriese @ Oct 20 2008, 02:53 PM) Hey SJ,I'm a little a little concerned at this point and not really sure what your trying to accomplish. It kinda sounds (and looks) like you need help with your homework... Which is fine by me as long as I'm "helping" and not playing proxy. If I do the work for you, I also do the learning (I never took statistics, so again, this is fine by me ), but you'll get left out in the end. So before we continue please think through your work using pseudo code and repost. I suspect that by doing so you'll be able to answer most, if not all, of your own questions. LAVA and I will be around if you really get stuck, however, we can't do the work for you. ~Dan Dan, I got it.I think they were working just fine. When everytime random number is generated, mean changes. I was just comparing the mean at the end of the program to each random numbers. Thank you for all your help, and I'll keep your advise in mind in the future at LAVA. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.