Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
3 ratings:
 3.66 out of 5     Rate this Document

Can I Convert an M-file script written in The MathWorks, Inc. MATLAB® language syntax into a HiQ Script?

Primary Software: Other NI Software>>HiQ
Primary Software Version: 4.5
Primary Software Fixed Version: N/A
Secondary Software: N/A

Problem: Can I convert an M-file script written in The MathWorks, Inc. MATLAB® language syntax into a HiQ script?

Solution: Yes, you do this using the Import Wizard.

1. Access the Import Wizard by selecting Notebook»Import Wizard
or select the Import Wizard icon in the toolbar.

2. In the Import From section of the Import Wizard, select the File
option and press Browse to select the M-file you want to translate.
After selecting the file, notice that the contents of the beginning of the
M-file appear in the Preview window.

3. If the Preview window is displaying the M-file you want to translate,
click the Next button at the bottom of dialog box to continue.
If the file has the default MATLAB extension, .m, the Import Wizard
automatically detects it as an M-file, and the Predefined option in the
Format section selects the description M-file to HiQ-Script. In the
upper right, notice the name of the script object that will hold the
results of the translation. To see the results of the translation, look in
the Preview window.

4. Click the Next button again to view the Translation Output Options
dialog, as shown in Figure 11-2.

5. Select the translation options that you want. The following list explains
the options in more detail. Notice that the Preview window is
automatically updated to reflect the new options.


    Header Comments— Inserts a header comment at the beginning
    of the translated file.
    Symbol Table— Includes a list of all symbols used in the
    translation. Use this option to verify the type descriptions of the
    translated objects and functions.
    General Comments— Includes explanations and general
    comments about the details of the translation.
    Interleave M-file as Comments— Interleaves each line of the
    original M-file with the corresponding translated line in
    HiQ-Script. Use this option to compare M-file script code with the
    automatically generated HiQ-Script code.
    Translation Footnotes— Appends additional translation
    footnotes to the end of the translation file. Use this option to obtain
    additional details about any limitations of the current translation.


6. Press Finish to complete the translation.


You also can translate M-files through the view of a script object. Although
this approach has fewer options than the first, it provides a faster and more
automated way to translate an M-file. The results of both procedures are the
same.

1. To translate a new M-file, place a new view of a new script object on
the notebook page.

2. Right click on the view and select File»Import MATLAB M-file.

3. Select the M-file you want to import. After you select the file, the
translation begins and the resulting translation is stored in the current
script object.

See Getting Results as a MATLAB User in your Getting Results with HiQ manual.

Note: National Instruments does not support HiQ functionality on Mac OS in LabVIEW 7.0 and will no longer support HiQ functionality on all platforms after LabVIEW 7.0. If your application uses HiQ VIs, consider replacing them with the Analyze and Mathematics VIs. Refer to the LabVIEW Help for information about using the Analyze and Mathematics VIs. You access the LabVIEW Help by selecting Help»VI, Function, & How-To Help.

MATLAB® is a registered trademark of The MathWorks, Inc. Other product and company names listed are trademarks and trade names of their respective companies.

Related Links: Getting Results with HiQ
HiQ Support


Attachments:





Report Date: 12/22/2000
Last Updated: 11/12/2005
Document ID: 24LCJNPQ

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit