Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
how to open .p and .m files??

Subject: how to open .p and .m files??

From: KK

Date: 17 May, 2008 19:32:49

Message: 1 of 9

Hello Everyone,

can anyone tell me how can we see the code of matlab files..
i m trying to .p and .m files but am unable to open that.

How should i see the code of it?

in which editor i should see it or it will b seen in the matlab
itself??

plz help me..


KK

Subject: how to open .p and .m files??

From: John D'Errico

Date: 17 May, 2008 19:38:02

Message: 2 of 9

KK <Kartikeya.Karnatak@gmail.com> wrote in message <62f61545-28a0-
446d-8283-772e23ec90e9@x19g2000prg.googlegroups.com>...
> Hello Everyone,
>
> can anyone tell me how can we see the code of matlab files..
> i m trying to .p and .m files but am unable to open that.
>
> How should i see the code of it?
>
> in which editor i should see it or it will b seen in the matlab
> itself??

You cannot open a p-file and see the code.

Any text editor will allow you to read an
m-file, including the default Matlab editor,
unless it is a built-in function that you will
open. In that event, you cannot read the
code.

John

Subject: how to open .p and .m files??

From: KK

Date: 17 May, 2008 19:59:01

Message: 3 of 9

On May 18, 12:38 am, "John D'Errico" <woodch...@rochester.rr.com>
wrote:
> KK <Kartikeya.Karna...@gmail.com> wrote in message <62f61545-28a0-
>
> 446d-8283-772e23ec9...@x19g2000prg.googlegroups.com>...
>
> > Hello Everyone,
>
> > can anyone tell me how can we see the code of matlab files..
> > i m trying to .p and .m files but am unable to open that.
>
> > How should i see the code of it?
>
> > in which editor i should see it or it will b seen in the matlab
> > itself??
>
> You cannot open a p-file and see the code.
>
> Any text editor will allow you to read an
> m-file, including the default Matlab editor,
> unless it is a built-in function that you will
> open. In that event, you cannot read the
> code.
>
> John






so how can we see the code??
is there any other way?
or no way we can see the code?

i mean if we want to make any changes how will we do it?

Subject: how to open .p and .m files??

From: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)

Date: 17 May, 2008 20:51:01

Message: 4 of 9

In article <fdce03b4-a881-4a07-a42e-6879ce597705@b9g2000prh.googlegroups.com>,
KK <Kartikeya.Karnatak@gmail.com> wrote:

>so how can we see the code??

For functions for which source is provided,
>> type FunctionName
or
>> edit FunctionName

For example,

>> edit polar


>is there any other way?
>or no way we can see the code?

>i mean if we want to make any changes how will we do it?

If the source code is not provided, such as for .p files or Matlab
internal function, then to see the source code, all you have to do is
buy a complete Matlab source license. I don't believe that a complete
source license is on their commercial offerings page, but you can speak
to a Mathworks sales representative about it. I believe it to be quite
likely that Mathworks deals with organizations that have very strict
rules about having access to source (in escrow at least) -- Matlab
is too useful of a tool for Mathworks to be likely to refuse to license
use of it for military applications that require the source to be
on file against the possibility of problems of National Interest
(you don't allow a corporation to dictate terms to your military.)

I have never had a reason to inquire with Mathworks about what they
would charge for a source license, but for one company with
an extensive product that I dealt with in the past, it was open knowledge
that the price of that company's source license was one million dollars.
With inflation and whatnot, it wouldn't surprise me if Mathworks'
asking price was several million.


If Mathworks chooses not to offer a source license to you,
you still have at least one alternative: you could simply buy the
company. It is, however, a privately held corporation, I believe,
so you will not be able to do a simple purchase on the stock exchange:
you would have to smooze around and find out who owns the private shares
(my understanding is that there must be at least one voting share, by
law) and then find out how much they want. They may just tell you
to get lost, as private companies are not required to sell for
any reason (short of court orders or expropriation), but I rather
believe that they would be open to takeover with a relatively
token offer: it probably wouldn't cost you more than about 80% of
the assets of Microsoft, I would guess. Just a "mark of respect", really.
--
  "I think Walter was a very smart man." -- Gene Autry

Subject: how to open .p and .m files??

From: KK

Date: 18 May, 2008 18:03:46

Message: 5 of 9

On May 18, 1:51 am, rober...@ibd.nrc-cnrc.gc.ca (Walter Roberson)
wrote:
> In article <fdce03b4-a881-4a07-a42e-6879ce597...@b9g2000prh.googlegroups.com>,
>
> KK <Kartikeya.Karna...@gmail.com> wrote:
> >so how can we see the code??
>
> For functions for which source is provided,
>
> >> type FunctionName
> or
> >> edit FunctionName
>
> For example,
>
> >> edit polar
> >is there any other way?
> >or no way we can see the code?
> >i mean if we want to make any changes how will we do it?
>
> If the source code is not provided, such as for .p files or Matlab
> internal function, then to see the source code, all you have to do is
> buy a complete Matlab source license. I don't believe that a complete
> source license is on their commercial offerings page, but you can speak
> to a Mathworks sales representative about it. I believe it to be quite
> likely that Mathworks deals with organizations that have very strict
> rules about having access to source (in escrow at least) -- Matlab
> is too useful of a tool for Mathworks to be likely to refuse to license
> use of it for military applications that require the source to be
> on file against the possibility of problems of National Interest
> (you don't allow a corporation to dictate terms to your military.)
>
> I have never had a reason to inquire with Mathworks about what they
> would charge for a source license, but for one company with
> an extensive product that I dealt with in the past, it was open knowledge
> that the price of that company's source license was one million dollars.
> With inflation and whatnot, it wouldn't surprise me if Mathworks'
> asking price was several million.
>
> If Mathworks chooses not to offer a source license to you,
> you still have at least one alternative: you could simply buy the
> company. It is, however, a privately held corporation, I believe,
> so you will not be able to do a simple purchase on the stock exchange:
> you would have to smooze around and find out who owns the private shares
> (my understanding is that there must be at least one voting share, by
> law) and then find out how much they want. They may just tell you
> to get lost, as private companies are not required to sell for
> any reason (short of court orders or expropriation), but I rather
> believe that they would be open to takeover with a relatively
> token offer: it probably wouldn't cost you more than about 80% of
> the assets of Microsoft, I would guess. Just a "mark of respect", really.
> --
> "I think Walter was a very smart man." -- Gene Autry

thanks very much for this suggestion of buying the company..
ll ask my CA's to work on this.. :)

cya

Subject: how to open .p ?

From: Buddhika wickramagedara

Date: 11 Sep, 2010 02:20:10

Message: 6 of 9

"John D'Errico" <woodchips@rochester.rr.com> wrote in message <g0nc6q$buq$1@fred.mathworks.com>...
> KK <Kartikeya.Karnatak@gmail.com> wrote in message <62f61545-28a0-
> 446d-8283-772e23ec90e9@x19g2000prg.googlegroups.com>...
> > Hello Everyone,
> >
> > can anyone tell me how can we see the code of matlab files..
> > i m trying to .p and .m files but am unable to open that.
> >
> > How should i see the code of it?
> >
> > in which editor i should see it or it will b seen in the matlab
> > itself??
>
> You cannot open a p-file and see the code.
>
> Any text editor will allow you to read an
> m-file, including the default Matlab editor,
> unless it is a built-in function that you will
> open. In that event, you cannot read the
> code.
>
> John

Subject: how to open .p and .m files??

From: Md. Hasan

Date: 5 Aug, 2012 17:40:34

Message: 7 of 9

how we can read .p file?

Subject: how to open .p and .m files??

From: dpb

Date: 5 Aug, 2012 18:29:30

Message: 8 of 9

On 8/5/2012 12:40 PM, Md. Hasan wrote:
> how we can read .p file?

No can do other than Matlab interpreter...the whole point is source code
security. Rather defeat the purpose if could simply de-obfuscate
wouldn't it?

--

Subject: how to open .p and .m files??

From: Steven_Lord

Date: 6 Aug, 2012 13:34:16

Message: 9 of 9



"Md. Hasan" <m.hasan883@gmail.com> wrote in message
news:jvmb6i$odm$1@newscl01ah.mathworks.com...
> how we can read .p file?

Ask the person or organization that gave you the P-file to give you the
associated pre-PCODE script/function/class file. If they refuse, or if they
don't have the associated un-PCODEd file anymore, you're out of luck.

--
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us