Why Does My MATLAB Script Return Error 1048?

I am running Matlab 6.5, and the matlab scrip is
M_thred2=M > Thred;
M is 2 dimensional array and Thred is a constant, so M_thred2 will have thresholded array from M.
If I make M as output, it works fine, but M_thred2 doesn't.

Hi,
This error can occur if your variable name is the same as a function name in MATLAB. For instance, using the variable name disp and then trying to return this variable will generate this error. To fix this, choose variable names that are not reserved names used by MATLAB. See the MATLAB online help or user manual for a list of reserved function names.
This error can also be generated if the Clear All function is used in your MATLAB script. To resolve the error, simply remove this function from your script. For more information on creating and using MATLAB scripts in LabVIEW, refer to LabVIEW's VI, Function, & How-To Help.
Hope this helps,
Isabelle
Ingénieur d'applications
National Instruments France

Similar Messages

  • Calling a Matlab script returns error code 1048

    I don't know how to proceed. My variable names are not Matlab function names.
    I'm using LabVIEW 6.1.
    I'm running the following Matlab version:
    » ver
    MATLAB Version 6.5.0.180913a (R13)
    MATLAB License Number: 156808
    Operating System: Microsoft Windows 2000 Version 5.0 (Build 2195: Service Pack 2)
    Java VM Version: Java 1.3.1_01 with Sun Microsystems Inc. Java HotSpot(TM) Client VM
    MATLAB Version 6.5 (R13)
    Simulink Version 5.0 (R13)
    Communications Blockset
    Version 2.5 (R13)
    Communications Toolbox Version 2.1 (R13)
    Control System Toolbox Version 5.2 (R13)
    DSP Blockset Version 5.0 (R13)
    Filter Design Toolbox Version 2.2 (R13)
    Fixed-Point Blockset Version 4.0 (R13)
    Image Processing Toolbox Version 3.2 (R13)
    MATLAB Compiler Version 3.0 (R13)
    Optimization Toolbox Version 2.2 (R13)
    SB2SL (converts SystemBuild to Simu... Version 2.5 (R13)
    Signal Processing Toolbox Version 6.0 (R13)
    SimPowerSystems Version 2.3 (R13)
    Spline Toolbox Version 3.1.1 (R13)
    Stateflow Version 5.0 (R13)
    System Identification Toolbox Version 5.0.2 (R13)
    Wavelet T
    oolbox Version 2.2 (R13)

    Matt,
    This error can occur if your variable name is the same as a function name in Matlab. For instance, using the variable name disp and then trying to return this variable will generate this error. To fix this, choose variable names that are not reserved names used by Matlab. See the Matlab online help or user manual for a list of reserved function names.
    Zvezdana S.
    National Instruments

  • Why MATLAB Language Syntax Return Error 1048?

    Why Does My Script Written in The MathWorks, Inc. MATLAB® Language Syntax Return Error 1048?
    x = (0:0.1:10)';
    y = sin(2*x)./exp(x/5);
    trnData = [x y];
    numMFs = 5;
    mfType = 'gbellmf';
    epoch_n = 20;
    in_fis = genfis1(trnData,numMFs,mfType);
    out_fis = anfis(trnData,in_fis,20);
    aa = evalfis([x x1],out_fis);
    http://www.mathworks.com/help/fuzzy/anfis.html

    What do you get if you define the output as a 2D array?
    (Or transpose the vector. Remember that matlab has a distinction between row and column vectors and LabVIEW does not). If you create a 2D array, it can be 1xN or Nx1 and you get all elements either way.)
    LabVIEW Champion . Do more with less code and in less time .

  • Texting on iPhone 5.  When texting to multiple people why does the contact list return to the "A"s after you select a contact and try to add the next one in order?

    Texting on iPhone 5.  When texting to multiple people why does the contact list return to the "A"s after you select a contact and try to add the next one in order?  This really slows you down when trying to contact 50 people with information.  iPhone 4 worked just fine.  Any suggestions on how to fix this?

    None of my pictures that I uploaded into iPhoto are in my Finder under Pictures.  Should I copy and paste my folders from iPhoto into here, in case something happens to my iPhoto program (in addition to backing them up onto an external hard drive like I already do)?
    No, that's just wasting space.  A back up needs to be on a different disk.
    Your photos are within the iPhoto Library.

  • Why does itunes send me an error message that says to verify my network setting when I try to download updates?

    Why does Itunes send me an error message that says to verify network settings when I try to download updates?

    Disable ALL security software (firewall, antivirus/spyware, etc) when updating.

  • HT4623 Hi why does my itunes always say "error contacting server" when i update my iPhone 5 with the iOs 6.1.3 update

    Hi why does my itunes always say "error contacting server" when i update my iPhone 5 (iOs 6.0.2) with the iOs 6.1.3 update?

    Hey Tigergirl17,
    Thanks for the question. If you haven't already done so, you may want to update iTunes to v11.1 (released on Sept 18th). After updating iTunes, you can then update your iPhone 5 to iOS 7.
    iOS: How to update your iPhone, iPad, or iPod touch
    http://support.apple.com/kb/HT4623
    Thanks,
    Matt M.

  • Why does the InitVXIlibrary function return -32768 ?

    Why does the InitVXIlibrary function return -32768 ?

    Hello,
    It would be extremely helpful to see a log of what is happening "behind the scenes" with the driver. To do this, you can use a utility called NI-Spy which can be launched from Start >> Programs >> National Instruments >> NI Spy or from the Measurement & Automation Explorer (MAX) utility.
    NI Spy is a Win32 application that monitors, records, and displays National Instruments API calls made by applications. Use NI Spy to quickly locate and analyze any erroneous National Instruments API calls that your application makes, and to verify that the communication with your instrument is correct.
    You can turn the log to file feature on via the Spy >> Options menu in the program. Please attach this log file to this Developer Zone post
    so that we may further help you.
    Best Regards,
    Justin Britten
    Applications Engineer
    National Instruments

  • Why does word for mac 2011 error

    When I am using the word for mac that came installed on my Mac Book Pro, it frequently errors and has to close and I loose my work.  Even though I choose the option to send the report and recover my work, i have lost many things.
    Why does this happen?

    Amy wrote:
    When I am using the word for mac that came installed on my Mac Book Pro
    To my knowledge, Apple does not supply MacBook Pros with MS Word installed.
    Pls specify exactly what app and what version you are talking about. If it is really MS Word, then it's possible it wasn't correctly installed. You should re-install MS Office, and then update it, if applicable.

  • Why does 3Dmark05 give me this error?

    This is a version I got off Limewire and its not full retail. Its only a demo. Got this error:
    IDirect #DDevice9:Present failed:Device lost(D3DERR_Divice Lost)
    I have the latest drivers off the Nvidia website. What gives? Never used 3d05 before, but I was just testing my new ASUS hybrid card with various benchmarks to make sure things seem to be running right. I do get a posted score in 3dmark05, even though it kicks me out and zaps my screen temporarily to 800X600. 3dmark05, after clicking the ok buttun after the error message posts my score 3,106 which seems about right seeing that I have a slower system.
    So far I have only benched this card, havent played any games for more then ten minutes. graphics seem better.Im not seeing the improvements in Far Cry that I though I would get from a 6800GT on full settings. I know this is a DDR128, but I just though things would be a smoother. Clarity is much better then the 9800pro and this card runs suppringly cool that 6600GT I tested was dangerously hot and I didnt want anything that hot in my case.
    I dont think there is anything wrong with the card. I tested a 6600GT the other week and the this 6800GT hybrid did get me from 43K to 46K on Aquamark3. My 9800pro was at 41K with a slight overclock.....maybe I try some Farcrytests to see if that shows anything...
    BTW I just was going to tell you have the latest drivers and was going to post the version, because after I got the card up and running I downloaded the latest from Nvidia.  Why does my Display Adapter when I click on properties say "7/9/2004" version "6.2.1.1"?....Now when I ran the driver update, it said it was updating the drivers and the drivers name they were version 9/13/05?

    Quote
    >It sounds like the version you got may be damaged. I would try getting the download directly from futuremark. The link >to download it is http://www.futuremark.com/download/?3dmark05.shtmlQuote
    I tried it with another version of 3Dmark05 and got the same error. I also noticed it does it during the CPU test where it tries to make the CPU think its a GPU. I found this:
    http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/directx9_c/directx/graphics/programmingguide/gettingstarted/devices/lostdevices.asp
    I also checked around the net. Seems like there are two reasons for this "lost" error. A resident program pissing 3dmark05 or a voltage issue....I havent had any problems with my system and only have then with 3dmark05. This is with a new version of 3dmark05 and newest drivers installed after Driver Cleaner. SO I still dont know whats up....Again it only does it durring the CPU test for 3Dmark05 and in particular always errors out right when the monster is emerging from the water During the zepplin test.
    Quote
    >As far as the jump is scores, that does not seem like enough going from the 9800 to the 6800. I was able to play >FarCry on my machine will ultra settings with my 9800 (but no anti-aliasing or ansiotropic filtering). And only going from >41k to 46k with aquamark also seems low. Did you use a drivercleaner to fully remove your ATI drivers? If not I would >remove both the NVidia drivers and get the cleaner and clean both ATI and NVidia drivers off of the system and >reinstall your NVidia drivers.Quote
    In my previous post I noted that I was only using the ASUS drivers dated 4/05. Well I went back and used Driver Cleaner then tested. The scores were about the same, but gameplay and visuals were much smoother as I would expect from a card like this. I though that was odd given I had  pretty much the same scores(meaning Aquamark stayed the same and 3dmark went up about 300 points). I then went back to Nvidias site and got the newest drivers and they loaded right this time
    Aquamark: increased 1,000 overal to a solid 47,000-47,500  (I was getting 41K with 9800pro,XTbios OC)
    3dmark03: 9608 (from 9137)
    3dmark05: same score no changes (as noted above still errors out at CPU test)
    Thanks for the input I am VERY happy to be running solid 47000-47500 Aquamarks where as before I was runnign 45500-46000 with driver issues. I not as familiar with 3dmark scores and how the differences pan out when playing games. But you mentioned that My scored seemed low. Is this 47,500 more like what you thought? Also remember the card that I have is a 16,6 6800 GT but has 1ddr128. In this review this guy only gets for 3Dmark03 10,290(vs my 9,608) but he has a 64 bit system. In another review using 3Dmark05 the guy gets 3,838 vs my 4,060 Here the card with some scores:
    http://www.digit-life.com/articles2/gffx/nv40-11.html
    http://www.ap0calypse.com/showthread.php?t=1287
    Things of note:
    1.) Graphics seemed less chopy by just using driver cleaner, but scored stayed about the same.
    2.) After gettting the latest drivers too. Aquamark showed a significant change, yet 3d05 stay the same
    3.) Question Driver Cleaner said to "empty the recycle bin" while in safe mode. I couldnt do this. How do I do that?
    4.) All this with the 1.3 Far Cry patch makes the game much nicer. I can do Full Blast settings, but there is some screen rippple every 15 seconds or so. Not to bad, But not flawlwss like a 64 bit system.

  • TS3276 Why does Deleted mail keep returning?

    why does deleted email messages keep returning?

    Try re-indexing the mailboxes. This can take awhile if you have a lot of mail.
    Reindex messages      Mavericks/Yosemite

  • HT4993 Why does my iphone say activation error

    Why does my iphone say activation error

    Because you are running an unauthorized version of the beat software for iOS 7. Or you are a legitimate developer and there is an issue with your last update. You will need to go to the developers section to fix it if that is the case.
    If you are not a developer contact the developer who got the beta for you.

  • Why does it say an unkown error accurred (-50)

    why does it say that everytime i try to put music it doesnt let me plzzzzzzzz help

    See this article.
    http://support.apple.com/kb/TA38535?viewlocale=en_US
    About the only suggestion I have though.
    B-rock

  • Why does my trace script give an application error?

    Hi All
    I have written a simple script to to trace a raster image using Illustrator.
    The image can be traced using >Object > Image trace in Illustrator without any problems.
    However, when I run my script I get the following error:  Application error 12321(some long number) 'MARC'.
    Does anyone have any advice on how I could solve this problem?
    Thank you!
    Also, my code is below.
    var jpgFilePath = new File ("/Users/Ellipse8.jpg")
    createRasterItem(jpgFilePath)
    function createRasterItem(jpgFilePath) {
    var rasterFile = File(jpgFilePath);
    var myDoc = app.documents.add();
    var myPlacedItem = myDoc.placedItems.add();
    myPlacedItem.file = rasterFile;
    myPlacedItem.position = Array( 0, myDoc.height );
    myPlacedItem.embed();
    var thisImage = myPlacedItem.trace();
    thisImage.tracing.tracingOptions.ignoreWhite = true;
    thisImage.tracing.expandTracing();
    redraw();

    you don't need to embed your image after you place it, remove or comment the line and it should work
    //myPlacedItem.embed();

  • Why does content.setLayout()  generate runtime error?

    Hi all.
    Can some guru please explain to me why this code is generating following runtime error:
    java.lang.Error: Do not use SampleView.setLayout() use SampleView.getContentPane().setLayout() instead
         at javax.swing.JApplet.createRootPaneException(Unknown Source)
         at javax.swing.JApplet.setLayout(Unknown Source)
    This is the top level TopLevelMenu.java which calls SampleView.java
    public void init()
        // java code
        public void actionPerformed(ActionEvent aevt)
            SampleView sampleview = new SampleView();  // <-- OKAY so far
    }And here is the snippet for SampleView.java
    public class SampleView extends JApplet
        public SampleView()
          Container content = getContentPane();
          content.setLayout(newBorderLayout());  // <-- RUNTIME ERROR HERE
    }Instead of just correcting my code, could you please explain to me what is wrong with it?
    TIA :-)

    Thanks, but that was a typo, I'm still getting this runtime error!
    I tried several different ways e.g.
    public void init()
        Container content = getContentPane();
        JPanel headerPane = new JPanel(new BorderLayout());
        SampleView sampleview = new SampleView();
        headerPane.add(sampleview, BorderLayout.NORTH);
        content.add(headerPane);
    public SampleView()
      // etc
      return;
    }throws the same runtime error! Very puzzled!

  • Replace Text script returns error when dropped in automator

    Hi Friends,
    I have a series of pdfs that were saved with spaces in their file names. I need to put them into folders for a website (there's a lot). Pretty newbie on this too but I figured I'd try.
    I tried using the example script "Replace Text in Item names" which worked on it's own.
    (hd:applications:applescript:example scripts:finder scripts)
    When I applied it as an action in Automator, I would get an error about "expected end but found on."
    I think that resulted from the default script. So I deleted that. Put the replace script in.
    I cut out the dialog boxes and specified folders, search, and replacement items. And cut out the second half (after the beep)
    However as I step through, when I get to the script it returns the error: No result was returned from some part of this expression.
    So I'm not sure what I'm missing.

    It is hard to tell without seeing the mangled modified script. Your main problem is probably related to the run handler, which needs to be defined in Automator's Run AppleScript action. Every AppleScript has a run handler, but in the case of the Replace Text in Item Names it is implied (not explicitly defined). You will need to place the main statements of the script inside the Run AppleScript action on run handler, leaving the other handlers (for example, setitemname) outside of the run handler.

Maybe you are looking for