How to do like this with array?
How to do like this with array?
I have 2 constants array put in main while loop ( array1{6,6}; array2{4,4} ). Those arrays will be come the input data for st in the small while loop inside.
The input data look like : [6,6],[4,4],[6,6],[4,4]...... I have to put input data to result array[8]. The method is:
input data result data
[6,6] --------------------------------------------> [6,6,0,0,0,0,0,0]
[4,4] --------------------------------------------> [6,6,4,4,0,0,0,0] ( this period, just add each element in new array)
[6,6] --------------------------------------------> [6,6,4,4,6,6,0,0]
[4,4] --------------------------------------------> [6,6,4,4,6,6,4,4]
[6,6,4,4,6,6,4,4] ( 1st period )
When the las index of result data array is filled in, I have to collapse the result data array to be this array:
----------> collapse: [6,4,6,4,0,0,0,0] ( take the average of 2 continuous element add to new result data array)
Next input data
[6,6] --------------------------------------------> [6,4,6,4,6,0,0,0]
[4,4] --------------------------------------------> [6,4,6,4,6,4,0,0] ( this period, add the average of 2 continuous elements in new array )
[6,6] --------------------------------------------> [6,4,6,4,6,4,6,0]
[4,4] --------------------------------------------> [6,4,6,4,6,4,6,4]
[6,4,6,4,6,4,6,4] ( 2 nd period)
----------> 2nd collapse [5,5,5,5,0,0,0,0] ( take the average of 2 continous element add to new result data array)
Next input data
[6,6] ....wait until input data has 4 elements
[4,4] -------------------------------------------------------------------------------------> [5,5,5,5,5,0,0,0]
[6,6] ....wait until input data has 4 elements
[4,4] -------------------------------------------------------------------------------------> [5,5,5,5,5,5,0,0]
[6,6] ....wait until input data has 4 elements
[4,4] -------------------------------------------------------------------------------------> [5,5,5,5,5,5,5,0]
[6,6] ....wait until input data has 4 elements
[4,4] -------------------------------------------------------------------------------------> [5,5,5,5,5,5,5,5]
[5,5,5,5,5,5,5,5] ( third period )
----------> 3rd collapse [5,5,5,5,0,0,0,0]
This wayl to make the tren graph.I made an VI to do that , but it's not yet correct.
Attachments:
tryyyyyyy.vi 39 KB
trend_mode.JPG 49 KB
Frankly, I don't understand your problem description or your VI.
In the description, the output array has a fixed size of 8 elements, is this correct? In this case you should initialize an array of 8 elements and do all operations "in place". I don't udnerstand the purpose of all the other code.
There are a lof of things that don't make any sense at all.
The second largest loop has no purpose, because it iterates only once per call
Sometimes you are concatenating an empty array to an existing array. This makes no difference.
Why is some of your data EXT representation???
What's up with complicated constructs such as that small loop shown in the picture. I show a somewhat simpler alternative.
Anyway, I have a hard time understanding your description. What should happen at the end? Do you have a link to a website that describes the algorithm? Does the algorithm have a name?
Message Edited by altenbach on 01-10-2008 09:55 AM
LabVIEW Champion . Do more with less code and in less time .
Attachments:
Simplify.png 5 KB
Similar Messages
-
iphone 4s with ios 8.1.1, imessage gets slower than ever, sometimes even deliver after 10 min, was not like this with the previous ios, how can I improve imessage sending time?
Hi there skmonirul,
Welcome to Apple Support Communities.
From what I gather, iMessages are taking longer than expected to send on your iPhone 4s. If you aren’t seeing issues with other apps, try restarting your iPhone as shown here:
Restart or reset your iPhone, iPad, or iPod touch - Apple Support
If the issue persists, try restoring your iPhone as shown in the article below.
Use iTunes to restore your iOS device to factory settings - Apple Support
So long,
-Jason -
I am trying to set up my apple tv using the hospital network. I am able to detect the network and chose it. But the way the system works is that you have to agree to the terms and conditions of using their network before access the internet. How do I accomplish this with apple? Please help.
There are some other options to you, if you're not at home and nobody is using your router you could set it up at the hospital, if this isn't an option you could get a second router and use it. Many ethernet routers are available on the cheap, and ethernet cables are cheap too.
Also, a macbook can share it's internet via the built in wifi it has. See this go to settings-sharing-internet sharing and configure as desired. This may require an internet connection via ethernet. But you should be able to create a wifi network for using something like airplay/home sharing. -
I have an itunes account on my home PC. I want to use my same account but on my laptop. How do i do this with out wiping out my phone and backing up all my Pictures and Apps? Please Help.
Copy everything from the old computer or your backup copy of your old computer to your new one.
Type "move itunes library from pc to mac" or similar into the google search bar. -
Hi, Unfortunately my Laptop has died (which had my iTunes on it). I want to ensure my music on my iPhone 5 and my iPad Air are backed up. Also, I want to sort my music in the way I used to with iTunes. How can I do this with just these two devices, i.e. NO Computer? Can the iCloud help? Why can't I download iTunes (i.e. my library as I saw it on the computer) to these devices? Thanks to anyone who can help me here.
You can change the email address of one's appleID...
I'd recommend changing moms email to yours to get a good backup on the Mac
Then switch mom's back to hers
Then change your account to the same email you used.
I've done something similar when I needed to update my Apple account (one ID changing email addresses and phone) -
In Pages 09 we can do Mail Merge and Import Styles from a document. Can someone please explain how we can do this with the new version of Pages 5.1. Even Apple solutions are only valid for Pages Version 09. What a DOWN GRADE! Thank god Pages 09 is still there.
…and the other 98 missing features.
Just use Pages '09, which should be in your Applications/iWork folder.
Rate/review Pages 5 in the App Store.
Peter -
I need to change a photo into a video file in order to post in youtube. How can I do this with my mac mini?
When I go to import, the choices are :
movies
camera archive
imovie for IOS
imovie for HD
It refuses to import a photo with any of these choices, which is located on the desktop or in a folder. It's a regular .jpg
There are instructions to drag it. I put it there, and it bounces right back. The photo will not stay.
I just need this one picture to go on so I can post a meditation on youtube. It doesn't come from a camera. -
I have the new iPad3 with Verizon. I am constantly having problems trying to connect to 3G. I had no problems like this with my older iPad and AT&T as the carrier. In fact, I find that if I cannot connect via Verizon, I can pick up my original iPad and connect right away ! Anyone else having this problem?
I fixed the problem. Sorry apple for wondering if it was on your end.
These are what helped me:
http://productforums.google.com/forum/#!category-topic/youtube/safari/CPW7r7OY5C o
http://mitchribar.com/2013/02/time-warner-cable-*****-for-youtube-twitchtv/
The solution worked instantly and my youtube plays super fast in hd just like verizons T.V. adds say they do. Now, that is. -
Trying to install Abode CS4 design standard Upgrade version.
How can I install this with out having to install all my previous versions?
Thanks
MarioYou simply install it and input the required serials, including one of a previous product when asked for it.
Download CS4 products
Mylenium -
I own iwork '09 for my Imac I and just bought a Macbook Air, can I have have the suite on both computers, and if so how do I do this with no CD drive on the MBAir
Welcome to Apple Support Communities
https://discussions.apple.com/message/18269126#18269126 -
I HAVE OS X 10.7.4 (Lion), BUT I NEED TO RUN SOFTWARE THAT REQUIRES POWERPC. HOW CAN I DO THIS WITH LION?
If you are running Lion then you cannot run PPC software. Your computer would have to be capable of being booted by Snow Leopard in order to run PPC software. Or consider upgrading your PPC software or buying replacement software that works with Lion.
What specific Mac model do you have? -
New iPad Air 2 (December 2014) with a persisting blank screen. Support site suggests a restore after turning off 'Find my iPhone' on the device. How can I do this with a blank screen?
Thanks JimHdk,
After a little more searching across various online resources I was able to cure it by holding down the home button and the on/off button for 10 seconds to restart it and it all came back with a clear screen. -
I am using Toast 11 to burn dvd's. With FCP10.1.3 I used to go into the FCP shared folder grab the encoded .m2v file and drag it into Toast 11 and author dvd and burn. How can you do this with FCP 10.1.4?
BenB it creates a disc image only and it's not in .m2v. I think it saved it as an Apple Pro Res 422 format instead. The disc image file format will not allow
Toast 11 to create menus etc. Thanks for your help. -
After updating iPod Touch to iOs 5.0, I cannot get into Game Center with previous nickname. The screen says my nickname is already in use by another account. Why did this happen and how can I fix this so I can still use the same nickname?
Did you haveany problem with updating to iOS 5? It soundsl like the update did not correctly restore from the backup that iTunes mnakes as the fisr step of the update.
-
How to manage tcp buffer with array
I am having trouble parsing data from the tcpread buffer. I can parse the data from the buffer I was just wondering if the following is possible...Is there a way to have each tcp packet that is received be put into an array element instead of having the buffer append the in received data onto itself. It would be much easier for me if the buffer was divided in to packets that way I could just parse each packet instead of having to find each packet then parse each packet individually? I was just wondering if there was an example or something, or do I need a vi myself to handle this. I noticed that the TCPREAD vi block has 4 options for the buffer...this is not one of them...but perhaps someone has done something like this before? Thanks for any help.
Unfortunately the project I have has a variable number of connections so it could be one or it could be up to 65535.
I've been thinking of a server-type example for my blog.
I've written a web server in LabVIEW before (1995 or so). Basically you separate the listener from the service functions.
The listener listens for connections and puts CONN IDs into a pool (queue). The pool contains all the connections that are active at the moment, along with some sort of status flag.
A service loop continuously extracts a connection cluster from the pool, handles it according to it's status, and either returns it to the pool, or terminates the connection and removes it from the pool.
The idea is that the server is a sort of state machine which runs through all current connections and gives them some attention.
You could also do it by spawning a number of copies (one for each connection) of a single reentrant VI, but I don't know about the performance of that. If you truly have a thousand connections at once, then you would have a thousand instances of this VI running in parallel.
That's a bit daunting to me, but then I've never tried it. Perhaps someone else could comment on that feasibility. It would seem that the thread-management overhead might be a problem, but I don't know.
Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com
Blog for (mostly LabVIEW) programmers: Tips And Tricks
Maybe you are looking for
-
Reversing the CO Document.
Hello, Overhead is calculated for 4.2% wherein the costing sheet it's maintained as 2.1%.. Requirement we need to reverse the original document which was posted calcuating 4.2% and post an other document Document is a controlling doucment- Secondary
-
Third Party Billing and Routing
How has anyone handling third party billing with routing algorithm utilizing the routing instructions?
-
ClassCastException when I access an EJB from a remote EJB in WL 8.1
I am using WebLogic 8.1 and am trying to lookup the home interface for an EJB (_ejbRemote_) from another EJB (_ejbCurrent_). They are deployed in seperate EARs. When I bundle the home and remote interfaces for ejbRemote in the EAR file that ejbCurren
-
Can't move apps to sd card in A3000
I Have a big problem. There is no move to sd card or move to internal storage button in my settings ( under clear data button) ! What should I do ??????? Spoiler (Highlight to read)
-
Is there a video tutorial for using cyberduck and iweb?
So, is there a video tutorial for using cyberduck and iweb to upload to a website? The written instructions on iweb are not specific enough.