03-29-2013 01:22 AM
Hi
This is my first go with formula node and l has to admit looking at other examples l have found a little confusing how a result was obtained. I prefer to do all programming in labview instead of going to another program to obtain the result l am after.I have tried array programming only for this problem and found it to be getting very complicated and large so l stopped. To me the formula node route should be simpler and more compact. My last resort is to use Excel but l still hope to do all programming in Labview so l end up with a more dynamic program.
Regards
Michael
Solved! Go to Solution.
03-29-2013 05:47 AM
I think you should post the expected 2D Array result for people to better undrestand you requirements.
03-29-2013 05:18 PM
Hi
Thank you for your interest.
I have provided you a vi that illustrates the solution l am after.
I could not get the pre and post increments to work ++ or -- and a number of other operators. My main problem was why a number of operators would not work. However simple formulas are easy.
I would like the code to examine cell by cell.
I found another example (quick sort vi) that uses partition to me it seems to be C code. It did not help with my understanding however it seems to be able to view cell by cell. Where as with my 1D array I found one cell that triggered an if statement placed 65 in all the remaining cells. I can see why this happened but l was not able to produce code to examine cell by cell values after the trigger point. This is how the 1D sort vi performs that is provided by Labview so l assume it is based on text code.
I hope my response clarifies my problem
Regards
Michael
03-30-2013 08:19 AM - edited 03-30-2013 08:21 AM
I hope this is what you are looking for. Sorry the diagram is a bit cluttered!
03-30-2013 05:01 PM
Typically we don't like to answer questions with limitating conditions (using a formula node). A graphical solution seems much more appropriate here, after all, this is a LabVIEW forum!
Do you really want to insist on a "formula node" solution? Why? Why do you even use LabVIEW then?
03-30-2013 06:25 PM
Hi
You are bloody brilliant...........!!!!!!!!!!!!!!
I just could not get it to would on multiple occasions using arrays, l have actually been on it for weeks. I never thought of the way you have solved this problem.
I hate excel and text programming. I am graphically minded that is why l like labview.
I did get a solution in Excel yesterday but your solution is far better than what l came up with
I very grateful
Thank you
Michael
03-30-2013 07:06 PM
Michael,
The courteous thing to do is to mark the post which helped you to fix your problem as the solution, probably the .aCe. post in this case. You first will need to go to the Options link on the right side and unmark your post as the solution and then mark the appropriate one.
Marking your own post as the solution does not help someone else with a similar problem to find the solution quickly.
Lynn
03-30-2013 07:28 PM
Hi Lynn
Yes it was aCe. It was a brilliant solution. I had the same ideas but was working at it on the right side of the array and ended up with a mountain of code. Just did not come up with an idea to do it from the left side of the array. In fact this is the first time l have found out that you could solve a sorting problem in this way.
Now what is this options mark all about? Are you able to provide more details? Is it normal to report to a moderator or highlight. I am very happy with the solution. I have only used the forum about two times may 3 to solve a programming problem.
By the way the only other array problem l have had on this forum is one that you had provided a solution. I understand how aCe solution has worked but the one you provided me in the past was also brilliant but l have not yet understand how it completely operates. I am just so happy that it works
So l am very grateful for both you and aCe
Regards
Michael
03-30-2013 07:54 PM
Your own message that you marked as the solution. There is a link called "Options" to the upper right of that. Pick it. Then pick "Unmark as Solution".
Then you can mark Ace's message as the solution.
03-30-2013 08:43 PM
Hi RavensFan
I see the Options link.
When pressed these are the options l have
Mark as New
Bookmark
Subscribe
Subscribe to RSS feed
Highlight
Email to a friend
Report to Moderator
I do not see Unmark as Solution. I did pick a button about solution that l do not see any more. I did this on my first response after first viewing the solution by aCe when l stated the solution was brilliant. So l believe l have done that part already.
It seems to me l have not marked aCe array as the solution. Do you use the message tag for that?
Regards
Michael