Cannot run this script in matlab

Hello..
Can anyone help me in running this script in matlab. It is a code in matlab for finding a R transformation. 
 "letzt_size reduced_2.jpg" is the inlut image we gives. Any image can be used. I tried to put this code in a Mathscript functionnode. Butit is not working. Otherwise this code works in Matlab.
D = imread('letzt_size reduced_2.jpg');
imagesc(D)
imshow(D)
[R,xp] = radon(D,[0 45]);
figure; plot(xp,R(:,1)); title('R_{0^o} (x\prime)')
theta = 0:360;
[R,xp] = radon(D,theta);
imagesc(theta,xp,R);
title('R_{\theta} (X\prime)');
xlabel('\theta (degrees)');
ylabel('X\prime');
set(gca,'XTick',0:20:180);
colormap(hot);
colorbar
save radon R xp -ascii -double -tabs
Nghtcwrlr
********************Kudos are alwayzz Welcome !! ******************

Hi Nghtcrwir,
the reason is LabVIEW doesnt have "imread" function in  Mathscript function node.
You can use LabVIEW help to check which matlab programs are supported by Mathscript function node.
All the Best!
Ritesh

Similar Messages

  • PSE 4.0 on Mac:  cannot run postflight script

    Built PSE 4.0 as root on 10.5.6, PPC G5 w/ Mac OS Extended (Case-sensitive Journaled) FS.  Near end of build: "file missing" then "cannot run postflight script."  Any ideas?  Thanks.

    Had you tried installing as a regular admin user? In any case, if this drive is also case-sensitive, that's where the problem lies.

  • When I run this script nothing is output to the screen or spooled to a file

    When I run this script nothing is output to the screen or spooled to a file. What do I need to do to get output from this script.
    SET SERVEROUTPUT ON size 100000
    DECLARE
    v_schema     Varchar2(50);
    v_statement      Varchar2(500);
    v_name varchar2(30);
    v_id varchar2(8);
    v_pwd varchar2(16);
    v_acct varchar2(16);
    CURSOR get_schemas IS
    SELECT DISTINCT owner
    FROM all_tables
    WHERE table_name = 'USERID'
    ORDER BY owner;
    BEGIN
    OPEN get_schemas;
    LOOP
    FETCH get_schemas INTO v_schema;
    EXIT WHEN get_schemas%NOTFOUND;
              v_statement := 'SELECT name,usid,passwd,acctnum INTO v_name,v_id,v_pwd,v_acct FROM '||v_schema||'.userid';
              execute immediate v_statement;
              DBMS_OUTPUT.PUT_LINE('Name='||v_name||' ID='||v_id||' PW='||v_pwd||' AC='||v_acct);          
    END LOOP;
    CLOSE get_schemas;
    END;
    /

    Do I include several variables after the INTO or just
    one?
    How do I loop through the record and print the
    individual variables?
    I appreciate your assistance!He already gave you the answer above:
    v_statement := 'SELECT name,usid,passwd,acctnum FROM ' || v_schema ||
    '.userid';
    execute immediate v_statement
    INTO v_name, v_id, v_pwd, v_acct;
    If this is not printing any output, it is because you don't have a table named USERID... what are you trying to do?

  • Getting the name of the Action that runs this script

    If I create a action in photoshop to run a script called "test script", How can I determine within the "test script" what action name started running this script?  I'm trying to write a script to scale my images.  The scaling will be determined by what Action ran this script.
    Example
    Action Names are 5x7, 4x6, 8x10
    Eash action above will run the same script called "scale me"
    Within "scale me", the java code will determine that 4x6 started running "scale me"
    "scale me" will go to the section within the java code to scale the image loaded in Photoshop to a 4x6 size.
    The reason for writing the "scale me" code this way is that I can maintain only one script to scale my images.
    Any suggestions or help would be appreciated.
    Raymond

    Thanks for all your comments.  Micheal, I took your code for the "ActionReference()" object and it works great!  I completed my code and it is working okay (some more testing needed).
    *  My Scaling Impage Script  */
    var docRef = app.activeDocument;  //Pointer to current opened document
    finish:
    if (documents.length == 0)      // Check to see if image opened if not, error message
                alert('There are no opened images\r\r' +"Exiting Script");
                break finish;
    var savedState = docRef.activeHistoryState      // Save the history state
    var originalUnit = preferences.rulerUnits   // Save the existing ruler perferences - units
    var ref = new ActionReference();  //Pointer to current selected Action
    ref.putEnumerated( charIDToTypeID("Actn"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );  // Point to selected Action
    var desc = executeActionGet(ref);
    var actionName = desc.getString( charIDToTypeID("Nm  ") );  // Get Name of seclected Action
    var actionSetName = desc.getString( charIDToTypeID("PrNm") ); // Get Group the selected Action belongs to
    var actionnumber = 100;    //actionname =  100  (No Action Defined as default)
    var portraitorienation = 0;  // Orientation default to portrait
    var resolutions = 300;  // resolution default to 300
    var sizeh = 999999;  // default size
    var sizew = 999999;  // default size
    var resolution = 300;
    var scaleup1 = 0;  //enlargement
    var scaleup2 = 0;  //enlargement
    var scaleflag = 0;
    var scaleflagg = 0
    //  Assumption is the long side is always defined in sizeh
    if (actionName=="4 x 5") { actionnumber =0;  sizeh = 1535; sizew = 1228;}
    if (actionName=="4 x 6") { actionnumber =1;  sizeh = 1842; sizew = 1228;}
    if (actionName=="5 x 7") { actionnumber =2;  sizeh = 2149; sizew = 1535;}
    if (actionName=="6 x 9") { actionnumber =3;  sizeh = 2127; sizew = 1842;}
    if (actionName=="8 x 10") { actionnumber =4;  sizeh = 3020; sizew = 2416;}
    if (actionName=="8 x 12") { actionnumber =5;  sizeh = 3624; sizew = 2416;}
    if (actionName=="11 x 14") { actionnumber =6;  sizeh = 4228; sizew = 3322;}
    if (actionName=="12 x 18") { actionnumber =7;  sizeh = 5436; sizew = 3624;}
    if (actionName=="12 x 24") { actionnumber =8;  sizeh = 7248; sizew = 3624;}
    if (actionName=="12 x 36") { actionnumber =9;  sizeh = 10872; sizew = 3624;}
    preferences.rulerUnits = Units.PIXELS
    var doch = parseInt (docRef.height);
    var docw = parseInt (docRef.width);
    scaleflag = doch-docw;
    if ( doch > docw ) { scaleflagg =1}
    if  (scaleflagg == 0)
                    portraitorienation = 1;  // Landscape Orientation
                    //alert("Seclected Landscape")
                    //alert(doch+" Height" +docw +" Width")
    var scale1 = docw - sizeh
    var scale2 = doch - sizeh
    if (docw > sizeh) {scaleup1=1}
    if (doch > sizeh) {scaleup2=1}
    // We know know what action was started (What size to scale to and the orientation - Landscape or Portrait)
          //      alert ( "Current selected action is: "+actionName+"\r\rin the action set: "+actionSetName +"\r\rAction Number is " +actionnumber +"\r\rDeminsions are (HxW):  "  +sizeh +", "+sizew );
            if (portraitorienation == 1)   //landscape if true
                            if (scaleup1 == 1)
                                            alert ( "This Photo is landscape\r\r"+ "The doc H x W are:  " +doch +" x " + docw +"\r\r" +"Resizing to (H X W:  " +sizew +", "+ sizeh + "\r\r"  + "Reduction");                               
                                            docRef.resizeImage (sizeh, undefined, resolution, ResampleMethod.BICUBICSHARPER)  // Reduction in size
                            else
                                            alert ( "This Photo is landscape\r\r"+ "The doc H x W are:  " +doch +" x " + docw +"\r\r" +"Resizing to (H X W:  " +sizew +", "+ sizeh + "\r\r"   + "Enlargement");                                       
                                            docRef.resizeImage (sizeh, undefined, resolution, ResampleMethod.BICUBICSMOOTHER)  //Enlargement in size
            else  // portrait
                        if (scaleup2 ==1)
                                            alert ( "This Photo is Portrait\r\r"+ "The doc H x W are:  " +doch +" x " + docw +"\r\r" +"Resizing to (H X W:  " +sizeh +", "+ sizew + "\r\r"  + "Reduction");                                                 
                                           docRef.resizeImage (undefined, sizeh, resolution, ResampleMethod.BICUBICSHARPER)
                            else
                                            alert ( "This Photo is Portrait\r\r"+ "The doc H x W are:  " +doch +" x " + docw +"\r\r" +"Resizing to (H X W:  " +sizeh +", "+ sizew + "\r\r"   + "Enlargement");
                                            docRef.resizeImage (undefined, sizeh, resolution, ResampleMethod.BICUBICSMOOTHER)
    preferences.rulerUnits = originalUnit  // Restore ruler perferences - units
    My script is a single file that is run by the Actions, I've created for each size and each action runs the same script.  When the script runs, it determines via "ActionReference();" what the current selected Action name is and then applies the scaling.  This script has logic for landscape and portrait and will scale using the different algorithms (bicubic xxxx) depending if it is reducing the image or enlarging.   The parametersfor the scaling is long side and constraint proportions.
    So if I have to add another size to the code, all I need to do is to add one line of code to the script, copy any of the existing Actions and rename the copied Action to the size and I am done.
    I'm not a experience programmer so pls don't laugh at my coding but have done some C, C++, Fortran (Yes I'm an electrical engineer) in my days.  A number of things has stumped me abit and one of them was the use of arrays which didn't work for me too well.  I was to use the array for storing my parameters of each size.  Another one that really got me puzzled was the use of the docRef = activeDocument object.  The docRef.height and docRef.width will tell you the dimensions of the document based on the units set for rules.  I set mine for pixels.  The problem I had was the statement if(docRef.height > docRef.width) { do some stufff}.  If I change the  > to < for the same document it alway gives me a "true" logical.  After some thoughts today, I suspect that true is anything not 0 and false is only 0.  I will try this out tonight.  This theory does not fit well with my understanding on how the if statement works in other languages.  Any comments on this would be appreciated.
    Oh and I noticed some extra code var declarations that is not needed such as the activeHistoryState - was determining if I need to use this or the perferences.rulerunits to restore my ruler perferences and apparently the activeHistoryState does not and forgot to remove from the code.

  • When pasted large # of values in Choice Prompt,  Stop running this script?

    Hi,
    In a choice prompt, I am cut paste large number of values (about 4000) in 11g dashboard. After a few seconds I get a popup 'Stop running this script?'. The same number of values works very quickly and without prompt in 10g.
    The behavior looks to be due to java script running to set the choice values in 11g. Even if I paste these as ; separated values time taken is very very large.
    Two questions
    (a) Why it takes so long compared to 10 g? If I paste small # of values (say 30) , control comes back with active 'Apply' button quickly.
    (b) What can be done to improve this performance?
    See this posting http://www.itwriting.com/blog/119-ie7-script-madness.html and work around to suppress the popup.
    I tried using presentation variable and that avoids the popup. Why?
    I will like to know what options I have for better user experience.
    Bhupendra

    You need to use Column Filter Prompt for this. One of the main reasons why this is not available in a Dashboard Prompt is that in a Dashboard Page you can have reports using the dashboard prompts and standalone reports(that do not use dashboard prompts). Since there is no link between the dashboard prompts and the individual reports per se, you would not be able to run the reports(that depend on the dashboard prompts) after entering the data in the dashboard prompt. The first way as i said is to use Column filter prompts instead of Dashboard Prompts. The other way to achieve this is, create the dashboard prompt and the report in seperate sections. Then minimize the report section. So, first time you open the dashboard the report would not run in the background. Expand when you actually want to see the report. The third way is to use presentation variables rather than using the is prompted clause. The fourth way is by specifying some default values(which i believe you do not want).
    Thanks,
    Venkat
    http://oraclebizint.wordpress.com

  • I see two dialog boxes when I run this script, why?

    When I run this script I see two dialog boxes of "Would you like to Minimize firefox", the first has no default button selected, the second one does.
    What is going on? How do I end up with only one dialog box?
    set minfirefox to "Would you like to Minimize firefox?"
    set tempvar to display dialog minfirefox buttons {"Yes", "No"}
    set ButtonPressed to button returned of tempvar
    display dialog minfirefox buttons {"Yes", "No"} default button "Yes"
    if ButtonPressed is "yes" then
    display dialog "you pressed " & ButtonPressed
    else
    display dialog "you should have pressed yes but you pressed " & ButtonPressed
    end if

    Hi--
    Welcome to the Apple Discussions...
    StewartAlexander wrote:
    When I run this script I see two dialog boxes of "Would you like to Minimize firefox", the first has no default button selected, the second one does.
    What is going on? How do I end up with only one dialog box?
    You're telling it to display the dialog twice. Once here without the default button:
    set tempvar to display dialog minfirefox buttons {"Yes", "No"}
    and then again here:
    display dialog minfirefox buttons {"Yes", "No"} default button "Yes"
    But you're ignoring the buttons returned from the second one.
    charlie
    PS. This probably does more like what you want:
    set minfirefox to "Would you like to Minimize firefox?"
    set tempvar to display dialog minfirefox buttons {"Yes", "No"} default button "Yes"
    set ButtonPressed to button returned of tempvar
    if ButtonPressed is "yes" then
    display dialog "you pressed " & ButtonPressed
    else
    display dialog "you should have pressed yes but you pressed " & ButtonPressed
    end if

  • Startup error message - Could not run this script because of a disk error.

    I uninstalled Dates-to-iCal-Launcher and couldn't find any info about how to uninstall it online (just dragged the icon from Applications to the Trash). Now every time I start my iBook, I get an error message from Dates-to-iCal Launcher (there is an icon that looks like a scroll on the left):
    Could not run this script because of a disk error.
    -43
    How do I get rid of this error message? It happens every time I turn on the computer. Thank you!

    thanks for the update.
    there is no risk when changing settings in any OS user interface like System Preferences etc.
    there could be some risk in manually deleting files from Library folders, which is done sometimes to uninstall applications.
    keep in mind to regularly back up important files.

  • The Sims 3 error message Device 0 cannot run this title.

    Unable to start game
    Device 0 cannot run this title.
    Your video card does not appear to support at least Shader Model 2. Please upgrade your card.
    HP Pavilion a1110n desktop PC
    Windows xp home edition service pack 3
    I have the following: Intel(R)82845G/GL/GE/PE/GV Graphics Controller
    Processor is Intel(R) Celeron(R) CPU 3.06GHz
    Under System Devices
    PCI bus
    Under VSO devices
    pcouffin device for 32 bits systems
    Monitor is
    Compaq 7550 Color Monitor
    Power supply is
    Bestec
    Input voltage is from 100 to 127 volts 6 Amps
    Output voltage is 250 Volts MAX.
    HP PN:*5187-1098*
    It is the original factory installed Graphics Controller for my desktop computer again is:
    Intel(R)82845G/GL/GE/PE/GV Graphics Controller
    Can I buy a new graphics controller for my specific model computer that will support The Sims 3?

    Need to know what model the laptop is.
    The error is saying that your video card/adapter doesn't support at least shader model 2.0 and the game needs it in order to run.
    if you have windows xp i would download the latest directx 9.0c from microsoft.com and also get the latest video drivers for your video card.
    if those 2 don't help (i'm sure it won't) then that's all you can do for that laptop.
    You can also go to canirunit.com and select the game you're planning on running and let it do a system check and it will tell you if your system can really run that game or not.
    There are many great and inexpensive laptops you can get nowadays for no more $500 that can run even newer games on.

  • Plsql developer - cannot run a script

    Hi,
    I have created some scripts to create some tables, triggers and sequences. To run these scripts I have another script which is like:
    set echo on
    set feedback on
    spool <path>
    @@ <first script>
    @@ <second script>
    so on and at the end closed or ended the spool...........
    I am trying to run this script in plsql developer but it gives me an error ............. on every statement .......
    Can any one help me how do I run this script........

    Well the actual scripts (something similar) would have helped.
    But since we dont have that let me start with basics
    Hope you are running those commands in the COMMAND Window and not sql window?Is that so?
    Cheers!!!
    Bhushan

  • Infoview stop running this script ...web browser to run slowly error

    Hi Everyone,
    I hope this is the right forum for this question. I'm experiencing 1 error with 1 report run from Infoview. When I run the report, I get this error: "Sop running this script? ... A script on this page is causing your web browser to run slowly. If it continues to run, your computer might become unresponsive." I say No twice to not stop running the script and then the report eventually displays.
    Is there something specific I should look for in my report which may be causing this?
    Thanks,
    John

    Hi John,
    Start by removing parts of the report to see what is causing the problem, Start with subreports and check the DB connection info if there is any.
    Verify the Report in the Designer also to confirm the connection info is correct.
    Don

  • "Press Run to run this script..." confirmation started appearing...why?

    I've got a set of AppleScripts I run from Spotlight, and all of a sudden they run with a confirmation alert that I've never seen before. Upon launch, each of these scripts puts up an alert that says "Press Run to run this script, or Quit to quit." So I gotta hit a button before the script will continue running.
    I did a web search on it, and they all said the same thing: You saved your script with the Startup Screen option on. But I didn't! They've been running headless for months, some for years, and none of them started displaying the confirm dialog until now. I even opened and resaved them with the Startup Screen option off (it wasn't even checked when I went to resave them) and they still do this.
    I guess I'll try fixing permissions unless somebody has a better idea. As far as I can tell, I've done everything right.

    You're dealing with scripts saved as applications, correct?
    I've encountered this issue in a somewhat different context, and I suspect that red_menace is correct that it has to do with the .rsrc file in the resources folder -- but I haven't figured out a "direct" fix.
    No guarantees, but try this:
    • Display the main script on the desktop by dragging the applet to whatever script editor you are using.
    • From the script editor menu (top of screen) select "file > save as." You'll get a drop down window over the script, showing the name of the original applet (without the name extension ".app"). Leave the name alone or change it as you wish. In any event, save the "save as" script as an application bundle in the same location as the original applet (e.g., desktop). If you didn't change the name, you'll have to choose to replace the original applet with the "save as" version; if you did change the name, you'll retain the original and get another with the new name.
    • At this point, double-click on the applet with the new name (if that's the approach you took); otherwise, double-click on the replacement applet. Do you still get the "Press Run to run this script..." message??
    As I said, no guarantees, but I'll be most interested in what you find.

  • 0x800713CF: The owner node cannot run this resource (SQL)

    I have SQL 2012 SP2 service on 2 FC nodes of 2012 R2 servers. Everything were working fine about a year, but now my first Node got mixed up with updates and it is offline now. Problem is, that second Node cannot start SQL services By its own.
    I checked/tried:
    - I checked, that other services related to SQL are online.
    - I chenged Node´s ownership to SQL service
    - Cluster name has full Access rights to OU where all Computer record of this service are in place
    The error I get: 
    0x800713cf:The cluster resource cannot be brought online. The owner node cannot run this resource.

    Thank you both. I´m not sure, how to to check the workload. In FC graphical GUI, both nodes are memebers in owner group, same Place where the owner order can be changed or owner can be disabled. I gone through entire FC management snap-in
    and didn´t find any other places or settings to go through. The article kb313882 Umesh refers, is for Server 2008, and I have 2012 R2. Command
    cluster res <var> name of resource</var> /listowners is not supported (there is no such command). I got first node up and running, and then SQL services were ON again, but if I shutdown first Node, SQL services will go down
    and won´t come up. Disk storage are online and SP level matches.
    Please could you guide me step By step, how to check ownership in 2012 R2?

  • Cannot run SQL script on Oracle Database 10g Express Edition

    I'm trying to upload a script, and the file is being uploaded fine, but in the Script Editor window where I'm going to actually run the script, the entire file content is shown on one line and the whole edit area is in red. I'm not being able to run that script. Also if I create a new script from the editor, the edit area is again in red and I'm not able to save it. Please help me understand what's to be done so that I can run my SQL scripts.

    I'd bet the database is down.
    Try a login through sqlplus ("Run SQL Command Line" in the Oracle Express Edition 'Start' menu).
    Do a CONN / AS SYSDBA
    If you get a message about database or memory area not available, try STARTUP.
    If that doesn't work, you are best off in the General Database forum or the Express Edition forum.
    You'll probably get the most expert response in General Database, but the Express Edition forum can be gentler on newbies (as it is more accepted that questioners are not and do not have access to full-time DBAs).

  • Cannot run install script

    When I run runInstaller script - it says nothing and nothing happens.
    Could anyone please help me

    I've got the same problem. I'm using Redhat 7.2 with kernel 2.4.18 and trying to install 8.1.7. When I trace the installer process, I see it looping continously and experiencing repeated segmentation faults.
    Sean

  • Cannot run calc script from Analyzer

    I just did an upgrade from 6.5 to 6.5.1 and I am unable to run one calc script on a particular database. I can run other calc scripts, just not this one. I get no error message or anything, I can keep clicking the calc button, but it does not run.Strangely, when I click the calc button, Analyzer puts a text file in the directory \\analyzer\appserver\bin with the user name (ex. gcrisci.txt) When you open this file, it is the calc script from Essbase I was attempting to run.I recall running into a problem like this in the past due to the size of the calc script. I thought the solution was to go into Analyzer.properties file and increase the MaxDataCellLimit values. The default is 50000, I've increased it up to 500000 with no resolution. So, I'm thinking maybe this isn't the fix.Does anyone know of a solution to this problem?Thank you.

    John,
    Here are the roles that i assigned my user and he can view/launch the calc scripts from Planning Web without actually being an admin( i think)
    Analytic Servers : server access
    Business Rules: Administrator
    Planning App : Interactive User
    APS : Provisioning Manager
    I would also like to conver the calc script to a BR as suggested, but not sure why i see no users available in the Business Rules-> administration tab.
    As indicated above, the use has been provisioned as a BR admin!
    Also, i tried refreshing the app with filters, refreshing the user list from BR->admin(right mouse), de-provision and re-provision the user! Any ideas??

Maybe you are looking for