A file with the extension.pin the context of matlab probably refers to a pcodefile. It is obfuscated bytecode, you won't be able to read anything useful. Nevertheless you can run the function calling it like any other matlab function. I am using MATLAB7.12.0(R20011a) version. I got one project from MATLAB File Exchange. That project contains so many matlab Files. But only one file contain P code extension. MATLAB® creates the P-files in the current folder. The original.m file or folder can be anywhere on the search path. The size of P-code is less than the m-code file size. So it may be a form of byte code with may be a weak encryption.
Matlab P File
But the matlab file is in p-file. How can I convert these file to m-file so that I can read the source code of the algorithm. P-code files exist specifically so that you can share code so that others can't look at it. In other words: You cannot see the code of a Matlab p-code file. 1.Matlab Image Encryption Code. Make three 'm' file in matlab.j.
- Matlab Tutorial
- MATLAB Advanced
- MATLAB Useful Resources
- Selected Reading
MATLAB represents polynomials as row vectors containing coefficients ordered by descending powers. For example, the equation P(x) = x4 + 7x3 - 5x + 9 could be represented as −
p = [1 7 0 -5 9];
Evaluating Polynomials
The polyval function is used for evaluating a polynomial at a specified value. For example, to evaluate our previous polynomial p, at x = 4, type −
MATLAB executes the above statements and returns the following result −
MATLAB also provides the polyvalm function for evaluating a matrix polynomial. A matrix polynomial is a polynomial with matrices as variables.
For example, let us create a square matrix X and evaluate the polynomial p, at X −
MATLAB executes the above statements and returns the following result −
Finding the Roots of Polynomials
The roots function calculates the roots of a polynomial. For example, to calculate the roots of our polynomial p, type −
MATLAB executes the above statements and returns the following result −
The function poly is an inverse of the roots function and returns to the polynomial coefficients. For example −
MATLAB executes the above statements and returns the following result −
Polynomial Curve Fitting
The polyfit function finds the coefficients of a polynomial that fits a set of data in a least-squares sense. If x and y are two vectors containing the x and y data to be fitted to a n-degree polynomial, then we get the polynomial fitting the data by writing −
Example
Create a script file and type the following code −
What Is A P File
When you run the file, MATLAB displays the following result −
Matlab.p Files
And plots the following graph −