Hariprasad - it would be easier to point out the problems if you had included all of your code, because it is unclear what line 73 is given that you haven't pasted 73+ lines of code in your question. In the future, please just attach your code to your question using the paperclip button. Given that this is a c file, you would have to change the extension to txt or m just to allow you to attach it.
A couple of problem is with how you try to create the cell arrays. Look at the first line
Dataset_info = mxCreateCellArray(ndims,dims);
Your are passing in ndims and dims, neither of which have been initialized at this point, and they are of the wrong data type. From the documentation for mxCreateCellArray, its function signature is
mxArray *mxCreateCellArray(mwSize ndim, const mwSize *dims);
This means that ndim is of type mwSize and dims is an array of type mwSize. They would need to be declared as
and defined as (for example)
ndims = 3;
dims = 3;
dims = 2;
dims = 1;
So what, in your code or from your file, should determine the number of dimension (and their sizes) for the Dataset_info and Dataset_OP arrays?
Start with fixing this problem, and then we'll go from there.
As James pointed out (see comment below), no memory has been allocated to the dims array. So have replaced