Error in creating Class

I have been working with IPIX radar data files for my project work. I am stuck up with using ncitem.m files which is used to extract files using netcdf command.
result = class(theStruct, 'ncitem');
The above statement is throwing error as
" The class function must be called from a class constructor".
It will be very helpful if somebody could post a solution for me to get around the problem.
Thanks in Advance.

2 件のコメント

Daniel Shub
Daniel Shub 2011 年 12 月 2 日
Are you trying to convert a structure theStruct into an object of class ncitem?
chandrakanth V
chandrakanth V 2011 年 12 月 6 日
sorry for the delay in reply but yes i am trying to do that

サインインしてコメントする。

回答 (1 件)

Honglei Chen
Honglei Chen 2011 年 12 月 2 日

0 投票

You can try
temp = struct2cell(theStruct);
ncitem(temp{:});

1 件のコメント

chandrakanth V
chandrakanth V 2011 年 12 月 6 日
thanks chen, i will try and let you know as soon as i can

サインインしてコメントする。

タグ

質問済み:

2011 年 12 月 2 日

Community Treasure Hunt

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

Start Hunting!

Translated by