Re: How to get the source code of a inbuilt function.




"Randy Poe" <poespam-trap@xxxxxxxxx> wrote in message
news:1155324071.844531.150620@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

pranabi wrote:
Hi,

I wanted to know how we can look at the source code of the inbuilt
function? For example if I wanted to see the source code of the
function such as imread();

Get a job at Mathworks?

The built-in functions are compiled, probably written in C,
and in many cases probably proprietary. So they aren't available
with a Matlab user license. You'd probably have to talk
to Mathworks on a case-by-case basis to see if they'd
give you a peek at source code.

This is correct for true built-in functions that are part of the source code
for MATLAB. Many of our functions are implemented as M-files, though, which
users can edit just like any normal text file. IMREAD is one of these; type
EDIT IMREAD to open it in the Editor.

Note to the OP: if you're planning to _modify_ one of our functions, please
please PLEASE do two things:

1) Make a copy of the function, say myimread.m, and modify just the copy.
This means that other functions we ship that expect IMREAD to work the way
we've implemented it will keep working as expected.

2) Don't store your copy of the function underneath $MATLAB/toolbox/ where
$MATLAB is the MATLAB root directory. That directory is cached for quicker
access -- so any changes to files in that directory won't get picked up by
MATLAB unless you refresh the cache. Search the documentation for "toolbox
path cache" for more information on this cache.

--
Steve Lord
slord@xxxxxxxxxxxxx


.



Relevant Pages

  • Simulink: Strange behaviour using C MEX S-Function
    ... i'm using Matlab 6.5 R13 and Simulink. ... As you can see in the source code i send "0.0" in the ... but i can't understand why the mdlOutputs method doesn't ... static void mdlInitializeSampleTimes ...
    (comp.soft-sys.matlab)
  • newbie question
    ... I've only programmed with Matlab before, and I am working to a very ... I have to use some source code for something that is ... #Put in library path to libCVD and gvars3 ... I have two folders with data in them, ...
    (comp.lang.c)
  • Protecting proprietary code with pcode?
    ... In the near future I will be distributing to customers the fruit of ... I wish to keep the source code (in ... Matlab) to myself. ... compiler for the usage of the MCR engine. ...
    (comp.soft-sys.matlab)
  • Re: Matlab Benchmarks Update
    ... We have updated the Matlab benchmarks at: ... Source code for the benchmarks is available in the example ... computation/simulation tool like MATLAB. ...
    (comp.soft-sys.matlab)
  • Re: a problem help me
    ... You are building a cache system. ... is for a person, using their web browser, to be able to visit a web site ... reach or less reliable than your cache server. ... This link provides complete C# source code for downloading web sites ...
    (microsoft.public.dotnet.languages.csharp)