MATLAB MAT-file Viewer plugin 1.3.8.2

519 views
Skip to first unread message

Leo.Chen

unread,
Jul 26, 2006, 12:31:38 AM7/26/06
to Leo. Chen, Sxx...@googlegroups.com

MATLAB MAT-file Viewer plugin 1.3.8.2

The MATLAB® MAT-file Viewer plugin is three plugins at the same time.

1. It adds packer support for the MAT-file type, i.e. you can treat MATLAB MAT-files (Version 4 and 5) like archives. For examples, it is possible to view variables of a MAT-file, to compare the variables of two open MAT-files, to delete variables from a MAT-file, or to add real numeric data from a text file to a MAT-file.

2. It can be used as content plugin, too, showing information about MAT-file version, platform (Version 5 MAT-file only), creation time (Version 5 MAT-file only) and number of variables.

3. The lister view shows the variables of a MAT-file, their size (number of elements), their size in Bytes and their class.

Last not least, a simple stand-alone MAT-file Viewer 5mat.exe has been added which uses the lister plugin interface of the MAT-file Viewer plugin.

It is strongly recommended to read the Readme for installation details and MATLAB dependencies.

Category: TC Packer Plugins
Status: freeware
Size: 157 KB
Author: Thomas Beutlich
Added: 12.02.2005
Updated: 7.04.2006
Downloaded: 10504 times
» Download


 
MATLAB MAT-file Viewer plugin

What's new

User comments

Thomas Beutlich (Author)


MATLAB MAT-file Viewer plugin 1.3.8.2 28.06.2006 - 14:49
// This is how I get string and double data from an mxArray.

mxArray *pa;
try
{
pa = matGetVariableInfo(mfp, name);
}
catch (...)
{
// error
}
if (pa)
{
mxClassID varClass = mxGetClassID(pa);
if ((varClass == mxINT64_CLASS) ||
(varClass == mxUINT64_CLASS) ||
(varClass == mxFUNCTION_CLASS) ||
(varClass == mxOPAQUE_CLASS) ||
(varClass == mxUNKNOWN_CLASS) ||
(varClass == mxOBJECT_CLASS))
{
pa = matGetVariable(mfp, name);
if (pa)
{
if (mxIsDouble(pa))
{
double *pr = (double *) mxGetPr(pa);
double *pi = (double *) mxGetPi(pa);
doubla dbl_r, dbl_i;

int k = 0;
for (int i = 0; i < mxGetM(pa); i++)
{
for (int j = 0; j < mxGetN(pa); j++)
{
dbl_r = pr[i + j * mxGetM(pa)];
dbl_i = pi[i + j * mxGetM(pa)];
}
}
}
}
else if (mxGetClassID(pa) == mxCHAR_CLASS)
{
char *buf;
int number_of_dimensions, buflen, d, page, total_number_of_pages, elements_per_page;
const int *dims;
buflen = mxGetNumberOfElements(pa) + 1;
buf = (char *) mxCalloc(buflen, sizeof(char));
if (buf)
{
if (mxGetString(pa, buf, buflen) == 0)
{
dims = mxGetDimensions(pa);
number_of_dimensions = mxGetNumberOfDimensions(pa);
elements_per_page = dims[0] * dims[1];
total_number_of_pages = 1;
for (d = 2; d < number_of_dimensions; d++)
{
total_number_of_pages *= dims[d];
}
for (page=0; page < total_number_of_pages; page++)
{
for (int row = 0; row < dims[0]; row++)
{
int column;
int index = (page * elements_per_page) + row;
char *str;
for (column=0; column < dims[1]; column++)
{
str = buf[index];
index += dims[0];
}
}
}
}
}
}
}
}
if (pa) mxFree(pa);

Thomas Beutlich (Author)


MATLAB MAT-file Viewer plugin 1.3.8.2 9.06.2006 - 01:30
2Gajendra Agrawal
I can tell you as soon as I am back from vacation. Hopefully it will not be too late for you then.

Gajendra Agrawal


MATLAB MAT-file Viewer plugin 1.3.8.2 8.06.2006 - 15:33
Can i get the source file for this one?
Or could some one tell me how to get the data of char type or numeric type. i am using mxGetString() and getting a run time error.
for retriving data from a numeric field i am using mxGetPr() it retrives null to me.
IF i use mxArrayToString() i am getting a null value.

Thomas Beutlich (Author)


MATLAB MAT-file Viewer plugin 1.3.8.2 15.05.2006 - 20:48
Just to mark the 10000th download...

elham khalaji


MATLAB MAT-file Viewer plugin 1.3.8.2 11.04.2006 - 03:20
I need a software to view a dll functions and their variables.
Thanks alot.

--
Yi Chen
leo.c...@gmail.com

http://www.mathworks.com/matlabcentral/fileexchange/loadAuthor.do?objectType=author&objectId=1094211
Reply all
Reply to author
Forward
0 new messages