Quick question on functions

I can't seem to find the answer anywhere. What's the syntax to use a function like f(x)?
Thanks

Hello,
To write a function like you show, you will need to create a .m file on disk.  The default location for .m files is in "My Documents\LabVIEW Data."  The syntax for such a function is
function y = f(x)
The name of the .m file needs to be the same as the function name.  Thus, in this example, save the file as f.m.  After that line, you can implement the body of your function.
In LabVIEW, go to Help >> Search the LabVIEW Help.  On the index tab, type MathScript.  Select the "function syntax" topic for more information about writing your own functions.
Grant M.
Staff Software Engineer | LabVIEW Math & Signal Processing | National Instruments

Similar Messages

  • Report Generation Toolkit Error Quick Question

    Hi,
         I created the most awesome LabVIEW report ever at my desk using a trial version of the RGT and Office 2003.  I took this to my production machine and ")@#(&%(*#^%()^!!!"  The production machine has office 2007 and a fully licensed version of the RGT.  Both machines have LabVIEW 8.6.0.  I've read all the stuff about these errors and something about classes and dll's and whatnot's.  So my quick question, is:  Instead of matching the versions of Microsoft Office as recommended, can I just rewrite from scratch the VI that creates this world's most awesome LabVIEW report on the production machine to create the same effect? 
    Solved!
    Go to Solution.

    Hi 
    Quick Answer: Probably
    Slower answer: Microsoft changed a lot of things behind the scenes in Office 2007, but the Report Generation toolkit version 1.1.3 supports Office 2007 so you should be good to go. Depends on what functions are included in your VI. Liek the read me says "Several default settings in Microsoft Office 2007 differ slightly from previous versions. Reports you generate using Office 2007 might look different than reports you generate from other versions of Office because font sizes, cell sizes, and so on, differ."
    Best Regards
    David
    NISW

  • Quick Question: When to use ( ) and when to use [ ] and why the ( *)

    Hi all,
    A quick question that i'm sure is very simple but is slightly confusing me. I've just started trying to learn Objective-C and am a little confused by ( ) and [ ].
    I get that you use the [ ] brackets when you want something specific from an object, i.e.
    [ textField textColor ]
    and that you use ( ) brackets for things like:
    if ( x == y) {
    But I get confused when I see things like:
    NSLog(@"some text here");
    Why does that get ( ) brackets and why is it not [ ].
    Also another point of confusion, creating methods... Why are some methods done like:
    - (void)awakeFromNib
    And others done like (with the additional "*" added):
    - (NSString *)stringvalue
    As I said, I'm sure this is very simple and obvious, but it is confusing me slightly.
    Thanks in advance!

    Adam:
    As you already know, square brackets are used to send a message to an object, so if a object like myObject implements the method -doSomething, you can call it with:
    \[myObject doSomething\];
    The other use square for brackets have is to index C-style arrays, such as:
    aValue = anArray\[10\]; // Get the 10-element of an array
    However, because C-style arrays are rarely used in Cocoa applications (use NSArray instead) you will not see this situation often.
    Parenthesis in expressions are used to group and prioritize, such as:
    x = 10 * (3 + 5); // x = 80
    If () statements use it to delimit the test expression. Same with while (). for () uses it to enclose the limits and increment statements, etc.
    The other important use of parenthesis is in calling a C function:
    result = foo(3);
    means that you are calling the function named foo with the argument 3, and storing the the return value in the variable 'result'. This is different from a message because a C function is not a method of an object. They exist independently of any objects. NSLog() is a function defined within Cocoa but it is not a method. So, you call it with the traditional C function call syntax. Cocoa defines other functions like NSStringFromRect(), which takes an NSRect as argument and returns a pointer to an NSString.
    And that leads me to your last question. Some methods return simple types, like int, float, or void (i.e. returns no value). These methods will have prototypes like:
    \- \(void\)returnNothing;
    \- (int)returnInteger;
    Other methods return pointers to types, like:
    \- (int \*)returnPointerToInteger;
    \- (void \*)returnPointerToAnything; // In obj-C one typically uses id instead of void*
    Returning whole objects from methods has problems and it is better to just return a pointer (the address in memory) instead:
    \- (NSString *)makeAString;
    The method above returns a pointer to an NSString rather than the entire object.
    Good luck with your learning,
    Juan-Pablo
    Message was edited by: Juan Pablo Claude

  • Question regarding functional​ity of "Sear​ch 1D Array Function&q​uot; in TCP/IP context

    In the attached tcp_Registry.vi, the vi uses the "Search 1D Array Function".  I can't figure out why this function can't find the index of the input element, since the inputs to the function match...
    Solved!
    Go to Solution.
    Attachments:
    tcpInstrument.llb ‏238 KB
    tcp_registry_error_2Jun09.zip ‏435 KB

    I was a bit surprised this morning by the fact that the Initialize vi worked, so I decided, "What the heck?" I'll try the "LCLSA Wave Save To File.vi" again, as I haven't been able to get this one working without errors for the past few months.  And, magically, it worked!  I didn't believe it, so I ran it again - and it worked again!  I still didn't think this was true, so I ran a slightly modified vi I made, "LCLSA Wave Save To File_looped.vi", which just repeats the vi for multiple iterations to create multiple data files.  And this worked, too!  I have NO idea why today everything seems to be fine - I've seriously had issues with the stuff for at least 3 months.  However, I'm just going to go with the flow and see if I can now implement this stuff in my own application now and will let you know how that goes.
    A quick question - do you have any suggestions as to how to view the data files properly?  I believe they come out as binary, but look like mumbo-jumbo when viewed in a text editor like WordPad.  Thanks!
    Attachments:
    3Jun09 Files.zip ‏2 KB

  • Re-importing into iPhoto 06 Quick Question

    I hope.
    My photos are on an external hard drive. I jogged the wire the other day during an import and stopped the import. When I next loaded up iPhoto all the photos had changed to ! , so I reimported them, which all worked fine, but it's reimported everything including the thumbnails, so I now have every picture at least twice and want to get rid of all the small sized files.
    Can I do it a quick way like search for photos below a certain size or should I import from a different point? I imported from the iPhoto directory, but should I have been a bit more specific on a sub directory? I want to make sure I get the original photos and any photos I've edited.
    Finally, should I delete the existing thumbnails in one of the directories before I re-import?
    Thanks

    It’s not a quick question.
    so I reimported them, which all worked fine, but it's reimported everything including the thumbnails, so I now have every picture at least twice
    This was not the way to go about this. You’ve now imported to a damaged database and that is inherently unstable.
    There is no way to search on file size in iPhoto. You may have some luck with Duplicate Annihilator
    However, do you still have the original library? If so, here’s how to start over:
    Try these in order - from best option on down...
    1. Do you have an up-to-date back up? If so, try copy the library6.iphoto file from the back up to the iPhoto Library allowing it to overwrite the damaged file.
    2. Download iPhoto Library Manager and use its rebuild function. This will create a new library based on data in the albumdata.xml file. Not everything will be brought over - no slideshows, books or calendars, for instance - but it should get all your albums and keywords back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one.
    3. If neither of these work then you'll need to create and populate a new library.
    To create and populate a new library:
    Note this will give you a working library with the same Rolls and pictures as before, however, you will lose your albums, keywords, modified versions, books, calendars etc.
    Move the iPhoto Library to the desktop
    Launch iPhoto. It will ask if you wish to create a new Library. Say Yes.
    Go into the iPhoto Library on your desktop and find the Originals folder. From the Originals folder drag the individual Roll Folders to the iPhoto Window and it will recreate them in the new library.
    When you're sure all is well you can delete the iPhoto Library on your desktop.
    In the future, in addition to your usual back up routine, you might like to make a copy of the library6.iPhoto file whenever you have made changes to the library as protection against database corruption.
    Regards
    TD

  • Quick Question about Cisco 3560 and the Web Device Manager

    Alright, I have a quick question that I am curious about but I haven't found any information
    about it.
    When I log into my Cisco 3560 using the web portal to get to the Device Manager. Below the
    diagram of the switch, then under the Dashboard there is section called Switch
    Health, Port Utilization.
    Under the Switch Health there is Bandwidth Used, Packet Error. Those two options just sit
    at zero and do not move. The Port tilization graph is also sitting at zero.
    Is there a way to make them functional?

    Anyone notice performance increase or decrease of their HD when using the nVidia IDE SW drivers?  particularly with a 74GB Raptor?  I've also heard of burner issues when installing the IDE SW but have not used my burner yet.

  • Quick Question (re:exporting from iMovie into iDVD)

    Hello everyone!
    I just have a quick question for you all... (I want to see if this is normal - I'm on a deadline and this is kind of freaking me out)
    So, we have a 20 minute or so video in iDVD. It plays fine, etc etc. The goal is to burn it to a DVD.
    I used the "Export -> to iDVD" function in iMovie, which launched iDVD.
    But here is the weird thing: nothing comes up in iDVD. It doesn't make a new file, doesn't give me anything... it is just open, waiting for me to create a new project to work with.
    YET, if I look in the Activity Monitor, I do see that EncoderServer (using 123% CPU) and ThumbnailServer (both iDVD processes) are running.... but shouldn't iDVD have told me it is working or that it is dealing with data?
    This is very un-"apple". I totally would have expected a progress bar of some sort in iDVD telling me it is working or something.... or is something wrong and I should try to export it in a different way?
    (I guess the underlying question is: when you export from iMovie to iDVD, does iDVD normally give you any 'heads-up' that it is working? how long does it normally take to open the project in iDVD?)

    Hi Matt!
    when you export from iMovie to iDVD, does iDVD normally give you any 'heads-up' that it is working? how long does it normally take to open the project in iDVD?)
    Yes, and it's instant.
    What you should see is iDVD opening and asking you to create a new project, It will suggest naming it the same as the iMovie project.
    There are reports that exporting from Imovie to iDVD can produce problems. What I do is save the iMovie project and close iMovie. Open iDVD, create the new DVD project, then go the File menu in iDVD, scroll down to Import, and in the side menu select Video. This open your Movie Folder, wherein resides your iMovie project. Select it and it imports into iDVD in a flash.
    Remember: iMovie projects go in the Movies Folder, iDVD projects go in the Documents folder. Change that, and they get very confused and unhappy.

  • Hi guys. Just a quick question. My wife has a Mac Book Pro and when she is browsing the web she can use a two fingered gesture to go back to her previous page (by swiping from right to left). Is there any way to set that up on my iPad Mini. Many thanks.

    Hi guys. Just a quick question. My wife has a Mac Book Pro and when she is browsing the web she can use a two fingered gesture to go back to her previous page (by swiping from right to left). Is there any way to set that up on my iPad Mini. Many thanks.

    Not in the Safari browser she can't. That is not supported on the iPad. There are other mobile browsers that do have that functionality - one is iCab Mobile.
    https://itunes.apple.com/us/app/icab-mobile-web-browser/id308111628?mt=8

  • Quick question from future mac user

    Hi there.
    Just a quick question about the Intel iMacs.
    Total noob with Macs so please forgive me, I'm looking to get away from Windows and PC's but not sure what I would need exactly.
    Would the 24":3.06GHz Intel Core 2 Duo iMac with 4GBs of RAM and 1TB hdd be more than enough to handle video/audio editing with Final Cut Pro Studio, some gaming (such as newer MMO games or RPG/FPS games) and maybe running VMware Fusion for running Windows apps and games that I have/use that are either not available or not yet supported by Apple?
    Or would I be looking at goin with the Mac Pro?
    I'd rather shoot for the iMac because I'm SO tired of PC's and boxes and would like my computer to actually look nice as well as kick butt. But I'm just worried that if I got with the iMac I won't be able to perform those functions well or at all.
    I love the look and feel of the iMac although I don't think you can get more than 4GBs of RAM or more than ONE hard drive inside (which isn't a big concern as I can always use external drives) so I'm just wondering if upgrading to the extra ram and hdd space from the get go would be a great help without having to worry about adding more later.
    I'd like to be able to just use the iMac than the Mac Pro because the price difference seems to jump up quite a bit between iMac and Mac Pro. I'm just worried if that type of iMac setup wouldn't be enough for what I need.
    Any suggestions or information would be greatly appreciated. Thanks.
    Janin

    The iMac in general is more than enough to perform those tasks well however the Mac Pro still has it's advantages. Lenn already went over those so take a look at these speed scores as they may help you to make your decision.
    http://www.marketingtactics.com/Speedmark/
    Either way I recommend getting the base RAM configuration from Apple and purchase RAM from OWC.
    http://eshop.macsales.com/item/Other%20World%20Computing/6400DDR2S4MP/
    http://eshop.macsales.com/MyOWC/Upgrades.cfm?sort=pop&model=284&type=Memory&TI=0 655&shoupgrds=Show+Upgrades
    George

  • Simple Quick Question

    wrong section, post was moved.
    Message was edited by:
    Rob17

    you titled "simple quick question"...
    .. complicated to answer..
    a) the TermsOfUse of the iTS don't allow any processing of purchased files, these are "copy protected"..
    b) iM has a voice-over function..
    c) iM is a video-edit app.. easy to use... just learn to handle it...
    d) iM allows to "extract" audio (=muting the original audio, adding your own..)
    e) to learn iM, spend some time here: http://www.apple.com/ilife/tutorials/imovie/index.html
    f) use pencil and paper first! WRITE and scribble, what shall happen when in your movie/parody... make a script, draw a storyboard .. THEN launch iM.. in other words: think first, then edit.. iM is just a tool, it does not "create"... Picasso needed a papertowel and half a stencil to create art....
    g) to get comfortable with iM, start with your own, small, short (3min!) project... import some stills, edit them, add a funny voice-over, add sounds, add music... good? make a bigger one...
    h) .. in our Lecture II, we teach you how to import shows from TV, youtube, wherever..
    standard disclaimer:
    be nice to ©opyrights ...

  • Questions - dereferenced Function Call, form capitalization

    Hey two quick questions.
    I'm wondering if I can call a com object function given that
    I have the string instead of the function name.
    ie. Instead of
    MyComObject.fucntionName(parameter);
    something like this
    stringVariable = functionName
    MyComObject.stringVariable(parameter);
    I know the syntax is incorrect but does anyone know how to do
    this in coldfusion?
    QUESTION #2 :
    I'm doing something like the following,
    for (keyName in FORM) {
    if (FORM[keyName] IS NOT "")
    WriteOutput("FORM." & Keyname & " has the value: "
    & FORM[keyName] &"<br>");
    However all the Keynames come out capitalized.

    quote:
    Originally posted by:
    BigRJJJ
    Hey two quick questions. ... ...
    However all the Keynames come out capitalized.
    These are not really quick questions. Suggest you repost
    question 1 on another thread and provide details of the COM
    function and which CF version you are using.
    As for CF uppercasing all the names of form fields, that's a
    "feature"! ;-)
    If you want the original case, then you need to process the
    raw post for that.
    See the attached code.

  • Two quick questions about Library after moving beginning on a new computer

    Hi there,
    I just moved from Windows to Mac, meaning I had to move my iTunes library from the old PC to my new MBA.
    Just a couple of quick questions.
    1. When I started iTunes on my new Mac, in the preferences I directed the media folder to the folder with all my itunes music/podcasts etc, and then I imported the Library XML file.  Is this incorrect? Should I have imported a different file? Should I have used the itl file instead? 
    If so, should I delete the library and start again?  (if this is the case, please suggest the best way of doing this without affecting my media)
    - a kind of sub-question to this one:  some of the media files arent showing up in the iTunes library, but they are in the media folder on the ext HDD.  Is there a way I can find out which ones havent been recognized by iTunes?  Whats the best way of getting them in to my library?
    2. Pretty much half of my podcasts have not been loaded in the new iTunes.  The ones that havent were ones that I subscribed to on my iPhone, whereas the ones that show up in iTunes were ones I downloaded from iTunes.  When I connect my iPhone and sync it with iTunes, will those podcasts show up in iTunes?  Or is there a risk that they will be deleted from my iPhone?
    Cheers,

    The .xml is lacking some information such as ratings, date added, and play count.  Using the .itl includes this information but cannot be imported using the method you did.
    A complete library is everything in the iTunes folder.  By using the method you did you left the artwork behind in the artwork folder on the other machine.
    Selecting the media folder in preferences does not get iTunes to recognize the media.  All it does is tell iTunes to start storing new media in that location.
    Using the method I outlined nothing will be missed (with the exception of WMA) because you aren't rebuilding your library, you are using the one that already exists.
    You don't have to re-copy everything as long as you get the stuff you missed and re-assemble it all as it was before except not on the Mac.
    What are the iTunes library files? - http://support.apple.com/kb/HT1660
    More on iTunes library files and what they do - http://en.wikipedia.org/wiki/ITunes#Media_management
    What are all those iTunes files? - http://www.macworld.com/article/139974/2009/04/itunes_files.html
    Where are my iTunes files located? - http://support.apple.com/kb/ht1391

  • Quick question re select-options

    Hi
    I am relatively new to ABAP but have a quick question:
    I need to create a select-options which does the following:
    1. Allows ONLY "equals" signs
    2. Disallows intervals
    3. Disallows the use of ranges in the multiple selection box.
    4. Allows multiple individual selections.
    I can achieve most using the following:
    select-options s_knvh for knvh-kunnr no intervals.
    However, this still allows ranges using the multiple selection box, and also allows the "not equal to" option.
    Adding the "no-extension" syntax simply removes my ability to use multiple individual entries.
    Any ideas?
    Thanks
    Jon

    Use this FM.
    SELECT_OPTIONS_RESTRICT

  • A quick question about WebDynpro SLD and R/3 with concurrent users

    Hello ,
    I have a very quick question about Webdynpros and SLD connecting to an R/3 system, when you configure a webdynpro to connect to an R/3 system using SLD, you configure a user name and password from the R/3  for the SLD to use. What I would like to know is when I have concurrent users of my webdynpro, how can I know what one user did in R/3 and what another user did? Is there a way for the users of the web dynpro to use their R/3 credentials so SLD can access the R/3? Like dynamically configuring the SLD for each user?
    - I would like to avoid leaving their their passwords open in the code ( configuring two variable to get the users username and password and use these variables as JCO username and password )
    Thanks Ubergeeks,
    Guy

    Hi Guy
    You will have to use Single Sign On to achieve this. In the destination you have defined to connect to R/3 , there is an option to 'useSSO' instead of userid and password. This will ensure that calls to R/3 will be with the userid that has logged into WAS. You wont need to pass any passwords because  a login ticket is generated from WAS and passed on to R/3. The userid is derived from this ticket.
    For this to happen you will have to maintain a trust relation ship between R/3 and your WAS ,there is detailed documentation of this in help files. Configuration is very straight forward and is easy to perform
    Regards
    Pran

  • QUICK QUESTION ABOUT PORTS

    Hi, I have a quick question about port forwarding/mapping. My question, lets say I am running MSN messenger, who's ports are 6880-6900. But lets say I am running a torrent application or something else that requires those ports. If both applications were running at the same time, would this cause interference with them on the same ports or now. Thanks
    Nathan

    Normally, only one application can listen to a specific port number at a time. If MSN is grabbing those 21 ports then your torrent app won't be able to run.
    However, most apps don't work that way - even if they use multiple ports, they don't use them all at the same time, so MSN might use 6880 when it starts up, leaving the others open for other applications to use if needed.
    Only experimentation will answer that one.

Maybe you are looking for

  • Shift key not working with some keys

    I am using a MAC Pro with two hard drives.  One runs Leopard and the other MS windows.  while in windows, the birghtness key illuminated (f2 key) and suddenly the shift 2, w, s, x keys quit working.  I decided to reboot and while holding the option k

  • How to fill empty business area in posted documents?

    Hi SAP Team, My Client need to fill the field "business area" for documents already posted. However, today all posted documents, have a rule + validation or substitution for this field.- fill business area to be filled in. For year 2013, my client wa

  • NOKIA C5 and problems with OVI and Windows 7 64Bit

    The phone does not recognize OVI (latest version). The S.O. and 64-bit Windows 7! I read on the Internet that several have the problem and find it shameful that Nokia has not been involved for months! Riccardo Solved! Go to Solution.

  • Sally Mae Johnson Jones

    How do I convert a PDF to WORD docx in Adobe ExportPDF, and do I need other software, besides Adobe ExportPDF, to do it?

  • How to open an ID file created with Adobe Cloud using CS5

    I have created files using InDesign using the trial version of Creative Cloud.  My trial period has ended - I do not need all the programmes that are part of CC.  How can I open my files using my original CS5?