Matlab p files-accelerate MATLAB programs and protect your algorithms

Source: Internet
Author: User
    • The P file is a pre-parsed version (preparsed version) corresponding to the M file ). Because when you execute the M file for the first time, Matlab needs to parse the file (PARSE) Once (the parsed content after the first execution will be placed in the memory for the second execution, that is, the second execution does not need to be parsed), which virtually increases the execution time. So we will explain it in advance. When we use the M file later, the corresponding resolved version, namely the P file, will be executed directly. However, because the MATLAB resolution speed is very fast, you do not need to perform pre-Resolution on your own. Only when someProgramPre-resolution is performed only when a lot of M files are called, such as GUI applications, to increase the call speed in the future.
    • P files can be used for confidentialityCodeIf you give someone an M file, someone else can open it to see all your code andAlgorithm. If your code is not visible to others, you can give it a P file.
    • The pcode function can also be applied to the m function file.

MATLAB command: pcode

PcodeFun
Pcode *. m
PcodeFun1 Fun2...
Pcode...-inplace

Description

PcodeFunObfuscates (I. e .,Shrouds) M-FileFun. mFor the purpose of protecting its proprietary source code. The encrypted M-code is written to P-FileFun. pIn the current directory. The original M-file can be anywhere on the search path.

If the input file resides within a package and/or class directory, then the same package and class directories are applied to the output file. See example 2, below.

Pcode *. mCreates p-files for all the M-files in the current directory.

PcodeFun1 Fun2...Creates p-files for the listed functions.

Pcode...-inplaceCreates p-files in the same directory as the M-files. An error occurs if the files cannot be created.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.