comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » help, cannot create hdf-sd string array variable
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
help, cannot create hdf-sd string array variable [message #34326] Thu, 06 March 2003 08:43
R.G. Stockwell is currently offline  R.G. Stockwell
Messages: 363
Registered: July 1999
Senior Member
Hopefully someone can give me a quick pointer.

(as a favor) I am transferring data written in idl, to another computer
to be read by matlab. I chose hdf to make it "easier". I don't actually
know any hdf, hence the question.

My problem is that I create 3 arrays in the hdf file,
one of which is a 2D string array. When I try to write it (string array),
I get the follow error message:


% HDF_SD_ADDDATA: Cannot write 13 elements. The data area is not that big.
% Execution halted at: HDF_RADAR_WRITE

Here is the relevant code:
..... snip .......
headersize = size(header_array)
sds_header_id=HDF_SD_CREATE(sd_id,'Header',[headersize[1],he adersize[2]],/string)
HDF_SD_SETINFO,sds_header_id,LABEL='header thing', $
UNIT='nadda'
; Write labels to each of the dimensions
HDF_SD_DIMSET,HDF_SD_DIMGETID(sds_header_id,0),NAME='headwid e',LABEL='label head tall'
HDF_SD_DIMSET,HDF_SD_DIMGETID(sds_header_id,1),NAME='headtal l',LABEL='label head tall'
; Create and write the data
HDF_SD_ADDDATA, sds_header_id, header_array
; Done Close down the SDS
HDF_SD_ENDACCESS,sds_header_id
..... snip .......


Now, when I change this (header_array and the sd_create call) to float (for instance)
everthing works fine.

So what is the problem with this? It seems specific to the string variable type.
Where does "13 elements" come from?
Note: header_array = string(findgen(10,2)+100)


Chees,
bob stockwell
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: HDF_DFSD_ADDDATA: Invalid HDF file or filename (test.hdf).
Next Topic: Re: help, cannot create hdf-sd string array variable

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 06:01:46 PDT 2025

Total time taken to generate the page: 1.76026 seconds