Mathscript using Reimann Zeta .VI

I have labview 8.6.1..the Reimann Zeta.VI  example fails for
a simple error 90051..but, how do you edit
the internally protected mathscript file....MCStatic_....XXXXX?
What is wrong with this VI...?
This example came with labview..It does not need editing to run.....
but it errors out when you run it...
JJB
Solved!
Go to Solution.

Thanks for the help...I did copy all files over..
But, when I was playing around with
modifying the m files..just trying to
see if they were bad...I corrupted
them on purpose and ran the software vi...
a new error came up..for good reason....
Next, I fixed the m files back...not sure what
happened..but after that new reload...
It is working on both computers...interesting
lesson for me...I am glad I had two computers
to debugg or at least learn from...
So in the end, Im up running...the vi was
probably not loaded correct first....but
somehow it was fixed...
Thanks...

Similar Messages

  • How to implement a user-defined function in a mathscript node

    I am trying to use a mathscript node that includes self-defined functions, but I always get an error. I tried to run an NI-example: MathScript using Riemann Zeta.vi ,and I got the same error I get when I run my own programmes:MathScript Node'MathScript Node' (zeta): User-defined function contains an error. I didn't change anything in that example, so what could be wrong?

    Try the Mathscript forum instead. Good luck.
    (Maybe start reading this, for example)
    Message Edited by altenbach on 11-18-2009 01:48 PM
    LabVIEW Champion . Do more with less code and in less time .

  • Implementation of state space model with constant disturbance in mathscript and simulation

    I am new to LabVIEW and now I am doing a project realizing heater control in 8 rooms.
    I have realized the state space model in the form x(k+1)=x(k)+u(k) using mathscript (using c_to_d) and feed it into control and simulation loop for simulation.
    My problem is, in my project, I have to consider the disturbance from the other rooms. So the statespace model changed to be x(k+1)=x(k)+u(k)+E*d, where E is the matrix concerning the disturbance and d is the vector of disturbance. How could I implement the disturbance and discretize the new model in mathscript and which function to choose for the simulation. Discrete state space stochastic model?
    Appreciate your kind help.

    Hello, state space models in LabVIEW most of the time are being implemented by utilizing mathscript syntax
    in addition with some functions of the LabVIEW Control Design and Simulation Module.
    There´s a couple of nice tutorials for control design with these tools which I´d like to point you to as a first step.
    http://www.ni.com/white-paper/6368/en/
    http://www.ni.com/white-paper/6368/en/
    http://www.ni.com/white-paper/6435/en/
    http://home.hit.no/~hansha/documents/lab/Lab%20Work/MathScript/MathScript%20Lab%20-%20Part%20II.pdf
    regards
    Marco Brauner AES NIG

  • Mathscript Array

    Hello,
    I wanna use the counter in my While Loop to acces the values of my vector/array inside the Mathscript. However, I get this message error:
    "Error -90026 occurred at Error in function V at line 1:  The indexes for a matrix indexing operation must be real, positive integers."
    Also, the counter is an integer, so I don't have a clueof what is the problem. I will attach my VI so I can make myself more clear. Thanks in advanced.
    Yours sincerly,
    Guilherme Garber
    Attachments:
    Mathscript_vector array.vi ‏23 KB

    Hello,
    The issue lies in the fact that LabVIEW uses 0-based indexing for arrays and MathScript uses 1-based indexing. The integer counter you reference is indeed an integer, but it starts at 0. Since 0 is not a positive integer (and also out of bounds for array indexing in MathScript), you see the error message.
    Grant M.
    Senior Software Engineer | LabVIEW Tablets | National Instruments

  • Mathscript Syntax Error

    Can anyone let me know what the syntax error is in this
    if((A>=1.70)&(A<=1.71))
    A=1
    if((A>=1.34)&(A<=1.36))
    A=1
    if((A>=0.925)&(A<=0.935))
    B=1
    if((A>=1.305)&(A<=1.32))
    B=1
    if((A>=1.935)&(A<=1.941))
    C=1
    if((A>=1.72)&(A<=1.73))
    D=1
    if((A>=1.70)&(A<=1.71))
    E=1
    if((A>=1.65)&(A<=1.66))
    F=1
    if((A>=1.29)&(A<=1.30))
    G=1
    if((A>=1.0)&(A<=1.05))
    H=1
    else
    I=1
    end
    thanks chris
    Solved!
    Go to Solution.

    I assume you want all of those if's (except the first one) to be an elseif.  If this is not the case, then you want to put an end after each individual if.
    Also, it's not a bad idea to throw a ; at the end of each statement.  (Not the lines containing if, elseif or end)
    Also, you probably want to use && instead of &.  I'm not sure if mathscript differentiates between the two, but I know some languages do.  The help file for mathscript uses &&, so I'd go with that.  Anyone care to confirm if there's a difference?
    Message Edited by elset191 on 05-07-2010 10:19 AM
    Tim Elsey
    LabVIEW 2010, 2012
    Certified LabVIEW Architect

  • MathScript Commands

    HI all, i'm quite new to LabVIEW MathScript and have been struggling with using the 'load' command in MathScript window to load the data  wanting to sort data in every column (total of 4) within a data file. I can perform this operation in Matlab simply by using the following commands:
    x = dlmread('c:\work\plotdata\plotdata', '  ');
    sortx =  sort(x);
    The problem i'm encountering now is that when I try to read all data within my datafile in MathScript using the dlmread command, I get the error 'Error in function dlmread at line 1. This function is not defined for the number of parameters you supplied.' Using the 'load' command produces the same error. Each columns are separated from each other by 2 spaces - which is what I specified as above. Please advise on the proper method.
    Next, I'm trying to sort the data in respective columns and am unable to do so in mathScript. I've attached a picture of the data file that I'm trying to sort. Note that the data in the picture has not been sorted yet. For any guru's advice....
    Solved!
    Go to Solution.
    Attachments:
    test.JPG ‏120 KB

    Hi....Sorry I forgot to mention that I'm using LabVIEW 8.5. Based on your response, I am suspecting that there is a problem with the formatting in the data file. Currently, 4 spaces are used to separate every column of data and when I try to read the datafile, MathScript returns the 'previously mentioned error message'. But thanks for pointing out my oversight that there is a need to make the data file's extension to be .dlm otherwise the dlmread cannot perform properly. Now my following question will be.....what/where can I find the full list of 'delimiters' are involved for parameter passing. Using my previous code as an example
    x = dlmread('c:\work\plotdata\plotdata.dlm', '\t') --> the \t is an example of a limiter to inform MathScript where is the location of next data. So again, I like to know if there are any resources indicating the 'delimiters'.
    Next question 
    sortx performs just the way I want it to....I guess I can only ask the next question on XY graphs until I managed to solve the earlier issue.

  • How do you do a linear piecewise function in MathScript?

    how do i graph a linear piecewise fuction of time in mathscript.  Im trying to create a  force vs time graph that from t=0 to t=5 (seconds) is the function y=x, when t=5 to t=10  the function is y=5 and from t=10 to t=15, the function is y = -x.

    Hi r.wilcox,
    I created a simple piecewise function in MathScript (using LV 2013) containing your 3 functions and their respective ranges. Hopefully this will get you started.
    Aldo A
    Applications Engineer
    National Instruments
    Attachments:
    MathScript.vi ‏38 KB

  • Mathscript - unexpected token: function

    Hi,
    i want to define my own function in Mathscript using the syntax function outp = functionname (inp1, inp2) as shown in the LabVIEW help.
    But it always says: unexpected token: function. Why?
    Pleas help me

    Hello Sunan,
    In order to define a function, you must use the function keyword.  Try changing the first line of your file to be
    function ave = compute_average(x, y)
    The error you are seeing is because your file is currently interpreted as a script.  The first line is interpreted as a function call to compute_average, which MathScript cannot find.
    Grant M.
    Staff Software Engineer | LabVIEW Math & Signal Processing | National Instruments

  • Missing library imath/engi​nes/lvmath

    Hi all, so i am trying to run an older .vi (several of them actually) not sure which version they were created in. My guess would be 8.2 or 8.5. I am using 2010 and there seems to be a missing library imath/engines/lvmath
    included in this is a bunch of MC_(somthing) type vi's
    also having the same problem with some excel vi's
    thoughts?
    Thanks
    Solved!
    Go to Solution.

    That looks like the code was using MathScript. In current versions of LabVIEW MathScript is an add-on. That you have to buy. So, you can:
    Rewrite the code to not use MathScript
    Buy MathScript
    Use an alternative. Scilab might work for you.
    P.S. When you try to close the VI LabVIEW will ask you if you want to save the file. If you click on the link that says "Describe changes" (or something like that), it will tell you the version of LabVIEW used to write the VI originally.

  • Why reservation don't show decimal same as process order?

    When i create process order 001 its require Mat.A 0.95 ZET, the problem is when see reservation at MB26 its whow order 001 require 1 ZET, Why it's don't show 0.95 as process order require?
    Information: Base unit of Mat.A = SET, Unit of issue of Mat.A = ZET, alternative unit is 1 ZET = 1 SET.
    In T-code CUNI, decimal places rounding of unit SET = blank, decimal places rounding of unit ZET = 4.
    we wouldn't like to set decimal places rounding of unit SET = 4 because, they think its will impact to other material which use unit SET. for this reason we create new unit name "ZET"
    Can any senior has solution to make reservation to show decimal when BOM use unit ZET.
    or not have the way and back to set Mat.A to user unit SET in BOM and set decimal places rounding of unit SET = 4. but this way they concern about risk.

    Dear,
    Please try with the customizing settings in t.code " CUNI " ---> Units of Measurement
    1.) Take your Units of measure, go to details Screen
    2.)There u can see the entry Box with " Decimal Places". Type in u'r option and save.
    This might solve u'r Query.
    Regards,
    R.Brahmankar

  • FFT performance

    Hi everybody,
    I copared the performance of the FFT algorithm for MathScript and original LabVIEW.
    For this I calculated a 128k FFT 100 times. The calculation time needed by MathScript
    is 4-5 times higher. I used a very simple MathScript code that just calculates the FFT,
    no loops, etc. involved. Does anybody know a good reason for this? It cannot be explained
    by the data exchange between LabView and MathScript. Is MathScript using a less efficient
    FFT algorith than LabView?
    Thanks
    Ulf
    Solved!
    Go to Solution.

    So, you want to compare FFT LabVIEW with FFT Mathscript (don't call it matlab on the indicators! ).
    To compare raw FFT performance, you should eliminate all other operations, for example:
    don't include the graph update inside the frame, it might steal CPU cycles.
    the dynamic data conversion (you coerce waveform to dynamic, back to waveform, extract Y array). Dynamic data conversions are often expensve.
    Don't compare with the express VI, which is also slower because it carries more baggage. Use the plain FFT.
    Don't do scaling (to dB, trim, etc.).
    Don't use stacked sequences, they make the code clumsy.
    Here's a quick example how a better benchmark would look like that only compares FFT and not all the extra stuff. You will see that now LabVIEW is even faster.
    FYI, Constant folding is internal optimization where certain data is folded into constant (example) (details). While there is folding in the FOR loop, it's OK, because the FFT is not folded as it seems.
    us09 wrote:
    Thanks for the reply. I use FFT or analysing of long time series sampled at high
    rates + overlapping. So waiting 30 minutes or 150 minutes make a some difference
    even it is not an entire order of magniltude.
    Ah, now we are getting to the interesting part. As you can see, it would be best to use all lowlevel function and code in a way to keep things in-place as much as possible and re-use data buffers. Use plain arrays instead of complicated data types and keep track of dt and df elsewhere. Coding style alone will make a huge difference. Do you have more details on how your data is arranged? You'll be surprised how fast these things can go when done properly.
    Message Edited by altenbach on 03-09-2009 08:02 AM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    FFT_Matlab_vs._Labview_2MOD.vi ‏37 KB
    FFT-speed.png ‏19 KB

  • Using mathscript to generate multiple digital outputs for switch control

    Hello 
    I am new to this NI LV and a have kind of a basic question. I would like to use Mathscript to generate an array of bolean numbers which will be used to control the Digital I/O lines. I am using NI 6251 USB device and the Mathscript code runs well. But I have a problem using this array to control the Digital output. So I created a simple test programme where I set the DAQ assitant to generate 4 digital outputs(P0.0 ~ P0.3) and it gives error that  ".. number of channels in the data does not match the number of channels in the task..." (see attachment) . How can I solve this problem thank you.
    Attachments:
    K-9.jpg ‏36 KB

    looks like you did not initialize all 4 of the elements in the bool array....

  • Use a Mathscript code which has both x and y data and produce it in a waveform

    I have this MATLAB code:
    t = (0:0.0000001:0.01);
    f1 = 0.0011312*cos(2*pi*49400*t);
    f2 = 0.003936*cos(2*pi*100*t);
    H = (f1*f2);
    x = ((2.93464*10^-10)*H);
    ms = 1000;
    M = ms (coth(x) - (1./x));
    I want to plot it on Labview 8.0 as M vs. t with 'M' being Y-axis and 't' being X-axis.
    I tried using MathScript to type the MATLAB code but when i add an output to it and connected it to a waveform, it does nothing....
    Thanks,
    K

    On Dec 9, 5:10 pm, Kris Matrix <[email protected]> wrote:
    > I have this MATLAB code:
    > &nbsp;
    > t = (0:0.0000001:0.01);f1 = 0.0011312*cos(2*pi*49400*t);f2 = 0.003936*cos(2*pi*100*t);H = (f1*f2);x = ((2.93464*10^-10)*H);ms = 1000;M = ms (coth(x) - (1./x));
    > &nbsp;
    > I want to plot it on Labview 8.0 as M vs. t with 'M' being Y-axis and 't' being X-axis.
    > &nbsp;
    > I tried using MathScript to type the MATLAB code but when i add an output to it and connected it to a waveform, it does nothing....
    > &nbsp;
    > Thanks,
    > K
    Two suggestions.
    There maybe some exceptions but most of the time with Labview's Data
    flow approach to programming you need to calculate all of your output
    points before you pass the data to a waveform graph. How are you
    accumulating your data?
    Instead of using a Labview waveform graph to plot the data use a
    Matlab plot command to plot the data. Once you can successfully plot
    the data with a Matlab plot command then go onto the next step and try
    to plot the data with a Labview waveform graph.
    Howard

  • How to create a filter using mathscript transfer function in labview

    Dear all,
    I am currently designing a filter in labview using a Mathscript looping. The filter can be represented in transfer function. I have attachted the transfer function equation together with its value and the desire frequency vs. amplitude graph that I should obtained from it. Also, following are the transfer function written in Matlab.
    B1= tf ([57.5221845],[1 51.017077 205.1868]);
    B2 = tf ([1 0],[7.6991]);
    B3 = tf ([1 0],[14.32433403]);
    B4 = tf ([1 0],[137.6017]);
    F = B1 * ( (1+B3)/((1+B2)*(1+B4)));
    plot(F)
    I have also modify the coding as Labview Mathscript does not support the Matlab coding "tf" as transfer function to "bilinear"
    Problem I am facing are:
    1) Unable to display the graph of the filter in labvie.
    2) Unable to have sinewave as an input to the filter.
    3) The output cannot be display in graph format. 
    Hope to have the soonest reply from you guys. Many thanks in advance 
    Solved!
    Go to Solution.
    Attachments:
    transfer function.jpg ‏18 KB
    Weighting Filter.vi ‏266 KB

    Thank you again for offering to help me in writing the code.
    I suppose that I should do a frequency sweep on the transfer
    function to prove that it behave as the sample graph. Example, if I have an input sine
    wave with the frequency of 8.8Hz passing through the transfer function filter, the
    output that I should be getting is 1 according to the transfer function graph
    and of cause the frequency range of my input sine wave would only be between
    the ranges of 0.5 Hz to 30 Hz.
    Attachments:
    Weighting FilterTest1.vi ‏53 KB

  • How to use FMINUNC in the MathScript - LabView 8?

    Inside the Mathscript node I have the following script:
    [xmin, fval] = fminunc('test',[2;2])
    and the function test is defined in the file test.m that has the following content:
    function f = test(x)
    f = x(1)^2 + 2*x(2) - 1
    The problem is that the FMINUNC is returning nothing to xmin neither to fval.
    Is it a bug or there is a problem with my code?
    I tried the sample given in the help and the problem is the same.

    Hi,
    ........... I use JDev 11g ..............
    If you make your inputText disabled -----> shortDesc will not be displayed.
    You can make a workaround to achieve this by using popup as :
    1- add showPopupBehavior inside your inputText as :
    <af:inputText label="label1" id="it1" disabled="true">
                    <af:showPopupBehavior triggerType="mouseOver"
                                          align="endBefore" alignId="it1"
                                          popupId="p1"/>
                  </af:inputText>2- add a popup which will display your shortDesc text
    <af:popup id="p1">
                      <af:outputText value="Sameh POPUP" id="ot1"/>
              </af:popup>I hope it is useful.
    Sameh Nassar

Maybe you are looking for

  • Unable to create Disc Image from DVD

    I get the following error when trying to make a copy of a family wedding DVD. I'm using Disc Utility and creating the image as a DVD/CD master (.cdr) file. It gets to about 3/4 of the way and then gives the following error. The internal drive is a PI

  • Oracle.forms.webutil.capi.capifunctions bean not found

    Hi...I'm trying to pick host name using webutil through the following command behind a push button in my form: :Pc_Nom     :=     Webutil_Clientinfo.Get_Host_Name; But it gives the following error: oracle.forms.webutil.capi.capifunctions bean not fou

  • How do I add a device in order to access itunes in icloud

    How do I add a device in order to access itunes in icloud

  • Illustrator CC Crashes on Save, Why?

    Illustrator CC crashes upon saving using OS X 10.75 on a Mac, with Dual Core Intel Xeon processor and 5 MB of memory. Tahoma and Verdana fonts are intalled. Why is this happening? Any help would be appreciated. We cannot save a crash log, because the

  • Elements 10 won't open my saved .psd files

    I am using a digital clipping mask (template original is a gimp format), and when I save it under a new name in .psd format, Elements says it cannot open it because it is the wrong type.  It will still open the files just fine using File>Open Recentl