Viewing Variable's memory location content?

Hi,
I would like to ask a question on variable display.
In C/C++, during debugging one can view variables directly at their memory location, and in most IDEs could you could choose display option (decimal, hex, binary, etc.).
Is it possible view variables like this in Matlab?
Does Matlab allow memory access? A little deeper: if Matlab is written in Java, does JVM, during bytecode execution, allow viewing memory location contents of variables?
Bob

 채택된 답변

Jan
Jan 2011년 10월 14일

1 개 추천

Matlab is not written in Java.
You can display the memory location of arrays by:
format debug
In addtion you can call a C-Mex file, which allows full access of the underlying data structure. But this structure is not documented and subject to changes. You can look in the FEX submissions of James Tursa to learn more about this: FEX: Author James Tursa

댓글 수: 5

Bob Li
Bob Li 2011년 10월 14일
http://en.wikipedia.org/wiki/MATLAB
The 1st able on the right: Written in C,Java
Picking up the Pace with the MATLAB Profiler
http://www.mathworks.cn/company/newsletters/news_notes/may03/profiler.html
Is it a mixture? How much part in C and how much in Java?
Jan
Jan 2011년 10월 14일
The computations are done in C. The GUI is based on Java, e.g. all visible GUI-elements are modified Java-Objects.
But you can run Matlab without Java, if you do not create GUI outputs. In addition, most toolbox functions of Matlab are written in Matlab. Before we discuss the relation of Java versus C code, the term "Matlab" must be defined clearly.
I think, this discussion is very accademic. Do you have a specific problem?
Bob Li
Bob Li 2011년 10월 14일
Jan,
Just interested:)
"most toolbox functions of Matlab are written in Matlab."
You mean toolbox functions are built on top of basic Matlab functions? It is quite clear if one opens some .m file of functions.
So I guess some very basic structures and their associated operations are written in C, and then uses Matlab commands to build the toolbox hierarchically?
Jan
Jan 2011년 10월 14일
@Bob: Correct. The memory management, mxArray structs, indexing, +-*/ is implemented in C. Linear algebra calls BLAS (I assume the FORTRAN version) or MKL (Assembler), and MEAN is an M-file.
Bob Li
Bob Li 2011년 10월 14일
Jan,
Do you know how to enable email notification for answer's comments? I never got a single notification for comments, and it seems there is no things like "configuration/options" in account setting to enable this?

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Call Java from MATLAB에 대해 자세히 알아보기

질문:

2011년 10월 14일

Community Treasure Hunt

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

Start Hunting!

Translated by