How can I see the details of the 'computeFi​nDiffGradA​ndJac' function?

조회 수: 16 (최근 30일)
Huy Tang
Huy Tang 2021년 4월 2일
댓글: Huy Tang 2021년 4월 10일
I am working on some problems in which I need to understand how this 'computeFinDiffGradAndJac' function works. I did some searching but got nothing. Does anyone know where I can get the document on this function?

답변 (1개)

Shubham Khatri
Shubham Khatri 2021년 4월 9일
Hello,
You won't find any documentation or info on .p files.
Basically, when you call a MATLAB function from the command line or from within another MATLAB file, MATLAB parses the function and stores it in memory. The parsed function remains in memory until cleared with the CLEAR command or you quit MATLAB. The PCODE command performs the parsing step and stores the result on the disk as a P-file to be loaded later.
For example:
pcode average
This command parses average.m and saves the resulting pseudocode to the file named average.p. This saves MATLAB from reparsing average.m the first time you call it in each session.
MATLAB is very fast at parsing, so the PCODE function rarely makes much of a speed difference. One situation where P-code does provide a speed benefit is for large GUI applications. In this case, many MATLAB files must be parsed before the application becomes visible.
Another situation for P-code is when, for proprietary reasons, you want to hide algorithms you have created in your MATLAB file.
For more information, refer to the documentation on PCODE:
doc pcode
Hope it helps.

카테고리

Help CenterFile Exchange에서 Adding custom doc에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by