Problems running MCrunch CertTest

Hi,

I am getting started with MCrunch and I have these errors with running CertTest (note running MATLAB 7.6.0 (R2008a)):

CertTest

=======
Test_01

Running MCrunch (v1.00.00r-mlb, 22-May-2008)

Reading “DLC2.3_1.out” (1.409390 MB).
Rows=1201, Cols=135
Done

Generating statistics for “DLC2.3_1.out”.
??? Undefined function or method ‘skewness’ for input arguments of type
‘single’.

Error in ==> GenStats>CompStats at 138
FileInfo.Stats.Skews (File,:slight_smile: = skewness(
FileInfo.Time(RowRange,:slight_smile: );

Error in ==> GenStats at 66
CompStats( File );

Error in ==> MCrunch at 36
GenStats( SumStatChans, WrStatsTxt, WrStatsXLS, SettingsFile );

Error in ==> CertTest at 14
MCrunch ‘Test_01.mcru’

Scott,

Sorry I didn’t respond earlier. I have no idea why it didn’t show up when I asked the forum to display new posts. Fortunately, Jason mentioned this to me.

MCrunch requires the Statistics and the Signal Processing toolboxes. The skewness function is in the Statistics Toolbox.

Marshall

Hi Marshall,

I should of suspected that I was missing toolboxes. Better yet, I should have read this in the user’s manual!

Take care,

Hello,

I also have an error with running CertTest with MCrunch (I am running MATLAB (R2016b).
I know that this is not the right MATLAB version. But I wanted to ask weather you will continue work on MCrunch in the future and update it to a higher MATLAB version.

Best regards,
Simon Wiedemann

Simon,

I have not run MCrunch with a version of MatLab newer than 2014a. Can you paste the error message you are receiving with your version of MatLab?

Thanks,

Greg

Hey Greg,

as for now I accepted to run MCrunch as the compiled version with the MCR package. That works fine.

FYI here is the error I get from MCrunch with Matlab R2016b:

MCrunch(‘Test_01.mcru’);

Running MCrunch (v1.00.00ab-gjh, 5-Jun-2012)

Reading “DLC2.3_1.out” (1.409390 MB).
Rows=1201, Cols=135
Undefined variable “FileInfo” or class “FileInfo.Time”.

Error in ReadManyFiles>@(Chan)eval(CalcChan(Chan).Eqn)

Error in ReadManyFiles (line 249)
FileInfo.Time(:,NumIC+(CC)) = cell2mat( arrayfun( @(Chan)eval( CalcChan(Chan).Eqn ), CC,
‘UniformOutput’, false ) );

Error in MCrunch (line 22)
ReadManyFiles( FileList, TitleLine, NamesLine, UnitsLine, FirstDataLine, CalcChan );

Best regards,
Simon

Hello,

Recently I had the same problem as Simon and found a Workaround.

As to the error message from Matlab the error occurs in line 249 of function ReadManyFiles. This function is defined in the file ReadManyFiles.m, which could be found in the Source folder of the MCrunch archive. Line 249 is part of the following if-condition/for-loop:

   % Add the calculated-channel data.

   if ( NumCC > 0 )
      for CC=1:NumCC
         FileInfo.Time(:,NumIC+(CC)) = cell2mat( arrayfun( @(Chan)eval( CalcChan(Chan).Eqn ), CC, 'UniformOutput', false ) );
      end % for CC
   end % if ( NumCC > 0 )
   

Here the problem seems to occur when executing the arrayfun function in Matlab 2017a. Unfortunately I didn’t find, why this is not working in Matlab 2017a. However when reading on the code in ReadManyFiles.m you will find “a more readable form of the above” code from line 254 on:

   % A more readable form of the above:

   %for Chan=1:NumCC
   %   FileInfo.Time(:,NumIC+Chan) = eval( CalcChan(Chan).Eqn );
   %end % for
   

After uncommenting this code snippet and commenting the above not working code snippet the MCrunch CertTest worked for me without any Matlab errors. I also scanned the file CertTest.comp after completion of the test procedure and didn’t found any differences except of different date and time stamps and some slight differences in formatting of numbers (e.g. 2.695e+02 instead of 2.695e+002).

Maybe someone of the MCrunch developers could also verify that both code snippets shown above are doing the same.

Best regards,
Paul

2 Likes