Searching 1D-array under LV6.1
Hallo, I have a large 1D-array. I want to search a certain number in it and save the positions into a new array. F.E.: Array 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 To be found is "3". The array I need would be 3 13 23 33. I know how to search in an array but my problem is saving the positions into the array. How can I do that? Arno PS: Please send back a VI which can be sarted under LabVIEW 6.1.
Re: Converting LV 7 to LV 6.1
Thanks for your hints, but they all need an INSTALLED version of LabVIEW 7. Do you know a way without installing the new version again? By the way, I cannot open the new files. If I try the message "VI version (7.0) is newer than LabVIEW version (6.1)." Arno
Converting LV 7 to LV 6.1
Does anybody of you know a way to convert LV7-VI's to LV6.1? I don't need to run them, I want to look at them. I am asking because I started with LV7 but had to change to LV6.1. My "old" VI's are not running anymore. Arno
Re: Array Subset with LabVIEW 6.1
Thanks for helping. But since I am using LabVIEW 6.1 I cannot open your VI which is written in LabVIEW 7. Please convert it to 6.1 or send back a picture of your code. (Under Windows 9x: Open the diagram, press Alt+Print (Druck in Germany, next to F12) paste the picture in MS Paint, save it as JPG or BMP or whatever and send it to the Forum.) Arno
Re: arithmetic average with LabVIEW 6.1
The easiest ways are always the best !! Thanks for helping me.
Re: arithmetic average with LabVIEW 6.1
Hi Lauren, thanks for the answer. Your idea works, but I need a more generous version: I have to extract the rows from a 2D-array, compute the arithmetic average of each row and add this value as a seventh column. Finaly I merge the rows together again to one 2D-array and save it to a txt-file. By the way, it won't have three rows, but more than 20. The VI should count the number of needed rows by itself. Perhaps someone can help me now. Arno
arithmetic average with LabVIEW 6.1
--3923272.1087216678518.JavaMail.quiq.tekken Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hallo, I have an array containing six rows and 3 columns. My task is to calculate the arithmetic average of the elements in the columns and add it as a seventh row to the array. How can I do that? I added a txt-file with the array. --3923272.1087216678518.JavaMail.quiq.tekken Content-Type: text/plain; name=test1.txt Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=test1.txt Content-Description: array 2,000 9,000 16,000 3,000 10,000 17,000 4,000 11,000 18,000 5,000 12,000 19,000 6,000 13,000 20,000 7,000 14,000 21,000 --3923272.1087216678518.JavaMail.quiq.tekken--
Re: Saving Arrays to one Array, Arrays zusammenfassen
--6962399.1084543713436.JavaMail.quiq.tekken Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Thanks Dave, it works ALMOST. Look into the output file. Arno --6962399.1084543713436.JavaMail.quiq.tekken Content-Type: text/plain; name=substract_ausgabe.txt Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=substract_ausgabe.txt Content-Description: Output -1,0E+1-1,10132E+4 -9,9E+0-9,96519E+3 -9,8E+0-9,01687E+3 -9,7E+0-8,15880E+3 -9,6E+0-7,38239E+3 -9,5E+0-6,67986E+3 -9,4E+0-6,04419E+3 -9,3E+0-5,46901E+3 -9,2E+0-4,94856E+3 -9,1E+0-4,47765E+3 -9,0E+0-4,05154E+3 -8,9E+0-3,66599E+3 -8,8E+0-3,31712E+3 -8,7E+0-3,00146E+3 -8,6E+0-2,71583E+3 -8,5E+0-2,45738E+3 -8,4E+0-2,22353E+3 -8,3E+0-2,01194E+3 -8,2E+0-1,82047E+3 -8,1E+0-1,64723E+3 -8,0E+0-1,49048E+3 -7,9E+0-1,34864E+3 -7,8E+0-1,22030E+3 -7,7E+0-1,10417E+3 -7,6E+0-9,99098E+2 -7,5E+0-9,04021E+2 -7,4E+0-8,17992E+2 -7,3E+0-7,40150E+2 -7,2E+0-6,69715E+2 -7,1E+0-6,05983E+2 -7,0E+0-5,48316E+2 -6,9E+0-4,96137E+2 -6,8E+0-4,48923E+2 -6,7E+0-4,06202E+2 -6,6E+0-3,67547E+2 -6,5E+0-3,32570E+2 -6,4E+0-3,00922E+2 -6,3E+0-2,72285E+2 -6,2E+0-2,46374E+2 -6,1E+0-2,22928E+2 -6,0E+0-2,01713E+2 -5,9E+0-1,82517E+2 -5,8E+0-1,65148E+2 -5,7E+0-1,49432E+2 -5,6E+0-1,35211E+2 -5,5E+0-1,22344E+2 -5,4E+0-1,10701E+2 -5,3E+0-1,00166E+2 -5,2E+0-9,06334E+1 -5,1E+0-8,20079E+1 -5,0E+0-7,42032E+1 -4,9E+0-6,71412E+1 -4,8E+0-6,07511E+1 -4,7E+0-5,49690E+1 -4,6E+0-4,97371E+1 -4,5E+0-4,50030E+1 -4,4E+0-4,07193E+1 -4,3E+0-3,68431E+1 -4,2E+0-3,33357E+1 -4,1E+0-3,01619E+1 -4,0E+0-2,72899E+1 -3,9E+0-2,46911E+1 -3,8E+0-2,23394E+1 -3,7E+0-2,02113E+1 -3,6E+0-1,82855E+1 -3,5E+0-1,65426E+1 -3,4E+0-1,49654E+1 -3,3E+0-1,35379E+1 -3,2E+0-1,22459E+1 -3,1E+0-1,10765E+1 -3,0E+0-1,00179E+1 -2,9E+0-9,05956E+0 -2,8E+0-8,19192E+0 -2,7E+0-7,40626E+0 -2,6E+0-6,69473E+0 -2,5E+0-6,05020E+0 -2,4E+0-5,46623E+0 -2,3E+0-4,93696E+0 -2,2E+0-4,45711E+0 -2,1E+0-4,02186E+0 -2,0E+0-3,62686E+0 -1,9E+0-3,26816E+0 -1,8E+0-2,94217E+0 -1,7E+0-2,64563E+0 -1,6E+0-2,37557E+0 -1,5E+0-2,12928E+0 -1,4E+0-1,90430E+0 -1,3E+0-1,69838E+0 -1,2E+0-1,50946E+0 -1,1E+0-1,33565E+0 -1,0E+0-1,17520E+0 -9,0E-1-1,02652E+0 -8,0E-1-8,88106E-1 -7,0E-1-7,58584E-1 -6,0E-1-6,36654E-1 -5,0E-1-5,21095E-1 -4,0E-1-4,10752E-1 -3,0E-1-3,04520E-1 -2,0E-1-2,01336E-1 -1,0E-1-1,00167E-1 0,0E+0 0,0E+0 1,0E-1 1,00167E-1 2,0E-1 2,01336E-1 3,0E-1 3,04520E-1 4,0E-1 4,10752E-1 5,0E-1 5,21095E-1 6,0E-1 6,36654E-1 7,0E-1 7,58584E-1 8,0E-1 8,88106E-1 9,0E-1 1,02652E+0 1,0E+0 1,17520E+0 1,1E+0 1,33565E+0 1,2E+0 1,50946E+0 1,3E+0 1,69838E+0 1,4E+0 1,90430E+0 1,5E+0 2,12928E+0 1,6E+0 2,37557E+0 1,7E+0 2,64563E+0 1,8E+0 2,94217E+0 1,9E+0 3,26816E+0 2,0E+0 3,62686E+0 2,1E+0 4,02186E+0 2,2E+0 4,45711E+0 2,3E+0 4,93696E+0 2,4E+0 5,46623E+0 2,5E+0 6,05020E+0 2,6E+0 6,69473E+0 2,7E+0 7,40626E+0 2,8E+0 8,19192E+0 2,9E+0 9,05956E+0 3,0E+0 1,00179E+1 3,1E+0 1,10765E+1 3,2E+0 1,22459E+1 3,3E+0 1,35379E+1 3,4E+0 1,49654E+1 3,5E+0 1,65426E+1 3,6E+0 1,82855E+1 3,7E+0 2,02113E+1 3,8E+0 2,23394E+1 3,9E+0 2,46911E+1 4,0E+0 2,72899E+1 4,1E+0 3,01619E+1 4,2E+0 3,33357E+1 4,3E+0 3,68431E+1 4,4E+0 4,07193E+1 4,5E+0 4,50030E+1 4,6E+0 4,97371E+1 4,7E+0 5,49690E+1 4,8E+0 6,07511E+1 4,9E+0 6,71412E+1 5,0E+0 7,42032E+1 5,1E+0 8,20079E+1 5,2E+0 9,06334E+1 5,3E+0 1,00166E+2 5,4E+0 1,10701E+2 5,5E+0 1,22344E+2 5,6E+0 1,35211E+2 5,7E+0 1,49432E+2 5,8E+0 1,65148E+2 5,9E+0 1,82517E+2 6,0E+0 2,01713E+2 6,1E+0 2,22928E+2 6,2E+0 2,46374E+2 6,3E+0 2,72285E+2 6,4E+0 3,00922E+2 6,5E+0 3,32570E+2 6,6E
Saving Arrays to one Array, Arrays zusammenfassen
--5115536.1084540059314.JavaMail.quiq.tekken Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hallo, I have two arrays, f.e. "1 2 3 4 5" and "6 7 8 9 0", an I want to save them in one array like: 1 6 2 7 3 8 4 9 5 0 (two values in one line seperated by tab) The "Build array" vi gives the following output: " 1 2 3 4 5 6 7 8 9 0" inkluding the strange Symbol "[]" (a square) and no linebreak. How can I handle this? I attached my original output. Arno PS: LabVIEW 7, answers in german, english or dutch --5115536.1084540059314.JavaMail.quiq.tekken Content-Type: text/plain; name=substract_ausgabe.txt Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename=substract_ausgabe.txt Content-Description: output file =00=00=00=0B-2,5E+1=00=00=00=0B-2,49000E+1=00=00=00=0B-2,48000E+1=00=00= =00=0B-2,47000E+1=00=00=00=0B-2,46000E+1=00=00=00=0B-2,45000E+1=00=00=00=0B= -2,44000E+1=00=00=00=0B-2,43000E+1=00=00=00=0B-2,42000E+1=00=00=00=0B-2,410= 00E+1=00=00=00=0B-2,4E+1=00=00=00=0B-2,39000E+1=00=00=00=0B-2,38000E+1= =00=00=00=0B-2,37000E+1=00=00=00=0B-2,36000E+1=00=00=00=0B-2,35000E+1=00=00= =00=0B-2,34000E+1=00=00=00=0B-2,33000E+1=00=00=00=0B-2,32000E+1=00=00=00=0B= -2,31000E+1=00=00=00=0B-2,3E+1=00=00=00=0B-2,29000E+1=00=00=00=0B-2,280= 00E+1=00=00=00=0B-2,27000E+1=00=00=00=0B-2,26000E+1=00=00=00=0B-2,25000E+1= =00=00=00=0B-2,24000E+1=00=00=00=0B-2,23000E+1=00=00=00=0B-2,22000E+1=00=00= =00=0B-2,21000E+1=00=00=00=0B-2,2E+1=00=00=00=0B-2,19000E+1=00=00=00=0B= -2,18000E+1=00=00=00=0B-2,17000E+1=00=00=00=0B-2,16000E+1=00=00=00=0B-2,150= 00E+1=00=00=00=0B-2,14000E+1=00=00=00=0B-2,13000E+1=00=00=00=0B-2,12000E+1= =00=00=00=0B-2,11000E+1=00=00=00=0B-2,1E+1=00=00=00=0B-2,09000E+1=00=00= =00=0B-2,08000E+1=00=00=00=0B-2,07000E+1=00=00=00=0B-2,06000E+1=00=00=00=0B= -2,05000E+1=00=00=00=0B-2,04000E+1=00=00=00=0B-2,03000E+1=00=00=00=0B-2,020= 00E+1=00=00=00=0B-2,01000E+1=00=00=00=0B-2,0E+1=00=00=00=0B-1,99000E+1= =00=00=00=0B-1,98000E+1=00=00=00=0B-1,97000E+1=00=00=00=0B-1,96000E+1=00=00= =00=0B-1,95000E+1=00=00=00=0B-1,94000E+1=00=00=00=0B-1,93000E+1=00=00=00=0B= -1,92000E+1=00=00=00=0B-1,91000E+1=00=00=00=0B-1,9E+1=00=00=00=0B-1,890= 00E+1=00=00=00=0B-1,88000E+1=00=00=00=0B-1,87000E+1=00=00=00=0B-1,86000E+1= =00=00=00=0B-1,85000E+1=00=00=00=0B-1,84000E+1=00=00=00=0B-1,83000E+1=00=00= =00=0B-1,82000E+1=00=00=00=0B-1,81000E+1=00=00=00=0B-1,8E+1=00=00=00=0B= -1,79000E+1=00=00=00=0B-1,78000E+1=00=00=00=0B-1,77000E+1=00=00=00=0B-1,760= 00E+1=00=00=00=0B-1,75000E+1=00=00=00=0B-1,74000E+1=00=00=00=0B-1,73000E+1= =00=00=00=0B-1,72000E+1=00=00=00=0B-1,71000E+1=00=00=00=0B-1,7E+1=00=00= =00=0B-1,69000E+1=00=00=00=0B-1,68000E+1=00=00=00=0B-1,67000E+1=00=00=00=0B= -1,66000E+1=00=00=00=0B-1,65000E+1=00=00=00=0B-1,64000E+1=00=00=00=0B-1,630= 00E+1=00=00=00=0B-1,62000E+1=00=00=00=0B-1,61000E+1=00=00=00=0B-1,6E+1= =00=00=00=0B-1,59000E+1=00=00=00=0B-1,58000E+1=00=00=00=0B-1,57000E+1=00=00= =00=0B-1,56000E+1=00=00=00=0B-1,55000E+1=00=00=00=0B-1,54000E+1=00=00=00=0B= -1,53000E+1=00=00=00=0B-1,52000E+1=00=00=00=0B-1,51000E+1=00=00=00=0B-1,500= 00E+1=00=00=00=0B-1,49000E+1=00=00=00=0B-1,48000E+1=00=00=00=0B-1,47000E+1= =00=00=00=0B-1,46000E+1=00=00=00=0B-1,45000E+1=00=00=00=0B-1,44000E+1=00=00= =00=0B-1,43000E+1=00=00=00=0B-1,42000E+1=00=00=00=0B-1,41000E+1=00=00=00=0B= -1,4E+1=00=00=00=0B-1,39000E+1=00=00=00=0B-1,38000E+1=00=00=00=0B-1,370= 00E+1=00=00=00=0B-1,36000E+1=00=00=00=0B-1,35000E+1=00=00=00=0B-1,34000E+1= =00=00=00=0B-1,33000E+1=00=00=00=0B-1,32000E+1=00=00=00=0B-1,31000E+1=00=00= =00=0B-1,3E+1=00=00=00=0B-1,29000E+1=00=00=00=0B-1,28000E+1=00=00=00=0B= -1,27000E+1=00=00=00=0B-1,26000E+1=00=00=00=0B-1,25000E+1=00=00=00=0B-1,240= 00E+1=00=00=00=0B-1,23000E+1=00=00=00=0B-1,22000E+1=00=00=00=0B-1,21000E+1= =00=00=00=0B-1,2E+1=00=00=00=0B-1,19000E+1=00=00=00=0B-1,18000E+1=00=00= =00=0B-1,17000E+1=00=00=00=0B-1,16000E+1=00=00=00=0B-1,15000E+1=00=00=00=0B= -1,14000E+1=00=00=00=0B-1,13000E+1=00=00=00=0B-1,12000E+1=00=00=00=0B-1,110= 00E+1=00=00=00=0B-1,1E+1=00=00=00=0B-1,09000E+1=00=00=00=0B-1,08000E+1= =00=00=00=0B-1,07000E+1=00=00=00=0B-1,06000E+1=00=00=00=0B-1,05000E+1=00=00= =00=0B-1,04000E+1=00=00=00=0B-1,03000E+1=00=00=00=0B-1,02000E+1=00=00=00=0B= -1,01000E+1=00=00=00=0B-1,0E+1=00=00=00=0B-9,9E+0=00=00=00=0B-9,800= 00E+0=00=00=00=0B-9,7E+0=00=00=00=0B-9,6E+0=00=00=00=0B-9,5E+0= =00=00=00=0B-9,4E+0=00=00=00=0B-9,3E+0=00=00=00=0B-9,2E+0=00=00= =00=0B-9,1E+0=00=00=00=0B-9,0E+0=00=00=00=0B-8,9E+0=00=00=00=0B= -8,8E+0=00=00=00=0B-8,7E+0=00=00=00=0B-8,6E+0=00=00=00=0B-8,500= 00E+0=00=00=00=0B-8,4E+0=00=00=00=0B-8,3E+0=00=00=00=0B-8,2E+0= =00=00=00=0B-8,1E+0=00=00=00=0B-8,0E+0=00=00=00=0B-7,9E+0=00=00= =00=0B-7,8E+0=00=00=00=0B-7,7E+0=00=00=00=0B-7,6E+0=00=00=00=0B= -7,5E+0=00=00=00=0B-7,4E+0=00=00=00=0B
applied mahematics (algorithm)
Hallo, this time I have a more mathematical question. It's a bit complicated, that's why I ask it in german: Ich muss zwei Messreihen voneinander abziehen (Einmal Pobe mit Halter, einmal nur Halter, Ergebnis Probe =3D Probe mit halter minus halter). Das Problem ist, dass die die Messreihen experimentell bedingt leicht gegeneinander verschoben sind. Gl=FCcklicherweise habe ich aber eine "Null", ein Ausschlag zu Beginn der Messung. Mein Problem ist nun, wie ich diese Null bestimmen kann. (Beispiel: f1(x) =3D sin x, f2(x) =3D sin (x+a). Ich brauche ein Verfahren, um dieses "a" zu bestimmen, um dann f1(x)-f2(x-a) zu berechnen. Die Funktionen sind aber nicht konkret gegeben, sondern physikalische Messdaten.) Mir geht es haupts=E4chlich um die Theorie, aber wer eine praktische Umsetzung f=FCr LabVIEW 7 kennt, ist herzlich dazu eingeladen, sie mir zu sagen. Eingebaute Funktionen sind mir am liebsten. Kennt eigentlich jemand von euch eine (deutschsprachige) Quelle, wo ich Details zum Levenberg-Marquardt -- Algorithmus bekommen kann? Google'n hat mich nicht weit genug gebracht. If possible help me (thanks) or translate it (thanks even more). Arno
Reading files
Hallo, this time I have two questions, I hope somebody can help: 1) I want to read a spreadsheat-file into an array, but WITHOUT the first two lines. How can I do that? I know how to read the data, but not how to ignore the first lines. 2) After the calculation I have two columns of data, x and y. I weant to save them in a spreadsheat-file like x y 1 2 3 4 etc., (seperated by tab; title not nescessary) I managed write single data into the file, but not the entire array. Arno PS: I am using LabVIEW 7, you can answer in german, english or dutch.
Re: read spreadsheat file
Hi Joe, I tried that, but it didn't change anything. Even "%.2f" did not work, it still were three digits right to the ".". Julien's suggestion works better, but is more complicated. Arno
Re: read spreadsheat file
Hi, your answer helps but LabVIEW only reads 6 digits at the right of the ".", I need more, f.e. 1.234567890123e-10. Some other questions: 1) How do I read every number in the file? Probably a while-loop, but I have no expoeriences with them yet. 2) How did you make the jpg-file? Thanks a lot, Arno Smeets PS: If I get "source-code" again, please write the (english) function-name to the icon. Thank you
read spreadsheat file
I want to read Data form a txt-file into LabVIEW. The data looks like 1.23456E-7. LabVIEW only takes three digits at the right side from the ".". How can I handle this? Arno Smeets PS: You can answer in english, german or dutch.