Cannot open structs with variabel viewer

Hi since a few days I cannot open all of my structs in the variable monitor. If I double click them on the WS the monitor shows up and I get this:
val =
Columns 1 through 7
[1x1 struct] [1x1 struct] [1x1 struct] [1x1 struct] [1x1 struct] [1x1 struct] [1x1 struct]
Columns 8 through 14
[1x1 struct] [1x1 struct] [1x1 struct] [1x1 struct] [1x1 struct] [1x1 struct] [1x1 struct]
(it looks exactly like in the Command Window). [edit] the struct is not named val [/edit]
This happens to not all of my structs. Some of them work properly (the way I can click on the 1x1 structs to see the actual data in there).
Does anyone know what to do? To me this is a really big problem, because I need to know the names of the variables inside the struct.
I'm running MLR2025a and Ubuntu 14.04
[Edit2] As I said before the name of the struct is not val. My struct (msgs_odom) contains 25000 sub-structs in these sub-structs there are variables like position, orientation and a time stamp. But I cannot display them with the variable viewer. I cannot click on:
[1x1 struct]
inside the Variable Viewer. [/Edit2]

1 Comment

Which struct is not named "val"? The posted text shows, that you display a variable called "val". Do you see the "val ="?

Sign in to comment.

Answers (1)

per isakson
per isakson on 10 Mar 2016
Edited: per isakson on 10 Mar 2016
The variable val is a cell array. Each cell contains a struct.
Compare
>> s.a=1;
>> cac = { s, s, s }
cac =
[1x1 struct] [1x1 struct] [1x1 struct]

5 Comments

There is no variable called val in my WS.
Is there a struct array with a field named val, and it is that outer struct you're opening in the Variable Editor?
x = struct;
x.val = {ones(5), rand(6), magic(7)};
x
Or perhaps it's an object? Show us the output of WHOS in the workspace where this behavior occurs and we can figure that out.
per isakson
per isakson on 11 Mar 2016
Edited: per isakson on 11 Mar 2016
"variable monitor" and "it looks exactly like in the Command Window" confuses me because I don't know what you mean by "variable monitor" and I'm not aware of anything in the Matlab IDE (Matlab Desktop) that displays text like the Command Window does.
"contains 25000 sub-structs" &nbsp could it be that you hit an upper limit of the size of structs, which the Variable Editor can handle?
I've tested it with smaller structs. It appears that the the Variable Editor could handle all structs with less than 1000 sub-structs.
output of whos:
>> whos
Name Size Bytes Class Attributes
abs_wert_sh 1x44192 353536 double
accessor 1x1 32 function_handle
accessor2 1x1 32 function_handle
accessor3 1x1 32 function_handle
ans 1x659 1318 char
b_pic_ex 1x1 8 double
bag 1x1 372 ros.Bag
bag_file 1x66 132 char
bag_file_name 1x23 46 char
c_mag 1x1 8 double
c_odom 1x1 8 double
c_prtlc 1x1 8 double
fi_ord 1x1 8 double
home 1x32 64 char
i 1x1 8 double
ia 44192x1 353536 double
interp_step_s 1x1 8 double
j 1x1 8 double
kernel 150x1 1200 double
l_interp 1x1 8 double
mag_xyz 3x46430 1114320 double
mag_xyz_fir 3x23120 554880 double
mag_xyz_med 3x23120 554880 double
mag_xyz_raw 3x23120 554880 double
mag_xyz_sh 3x44192 1060608 double
map_pgm 512x576 294912 uint8
map_pgm_name 1x27 54 char
map_yaml_name 1x28 56 char
map_yaml_struct 1x1 1494 struct
max_abs 1x1 8 double
max_mag 1x1 8 double
max_x 1x1 8 double
max_xy 1x1 8 double
max_y 1x1 8 double
meta_mag 1x23120 28715040 cell
meta_odom 1x24597 30205116 cell
meta_prtlc 1x971 1221518 cell
min_mag 1x1 8 double
min_x 1x1 8 double
min_xy 1x1 8 double
min_y 1x1 8 double
msgs_mag 1x23120 42494560 cell
msgs_odom 1x24597 98781552 cell
msgs_prtlc 1x971 137837334 cell
n 1x1 8 double
odom_angl 1x1 590856 struct
odom_ori_raw 4x24597 787104 double
odom_xy 2x46430 742880 double
odom_xy_sh 2x44192 707072 double
odom_xy_sh_v 44192x2 707072 double
odom_xy_v 46430x2 742880 double
odom_xyz 3x46430 1114320 double
odom_xyz_raw 3x24597 590328 double
ori_buffer 4x1 32 double
ori_prtcl_raw 4x971 31072 double
pos_buffer 3x1 24 double
pos_prtcl 3x46430 1114320 double
pos_prtcl_raw 3x971 23304 double
prog 1x26 52 char
prtcl_angl 1x1 23832 struct
raw 1x1 1 logical
raw_twist_definition_mag 1x1149 2298 char
raw_twist_definition_odom 1x384 768 char
step_s 1x1 8 double
t_end 1x1 8 double
t_start 1x1 8 double
times_interp 1x46430 371440 double
times_interp_sh 1x44192 353536 double
times_mag 1x23120 184960 double
times_mag_zero 1x23120 184960 double
times_odom 1x24597 196776 double
times_odom_zero 1x24597 196776 double
times_prtlc 1x971 7768 double
times_prtlc_zero 1x971 7768 double
topic1 1x4 8 char
topic2 1x5 10 char
topic3 1x14 28 char
twist_definition_mag 1x177 354 char
twist_definition_odom 1x620 1240 char
twist_definition_prtcl 1x262 524 char
x_map 1572x1572 19769472 double
y_map 1572x1572 19769472 double
yaw_odom_twist 1x24597 196776 double
I added a picture of what I see when I double click on such a struct in the Workspace
Now, I understand, but I cannot help. Comments:
  • whos shows that msgs_mag is a [1,23120] cell array. Why don't you use a struct array instead? However, that is beside the point.
  • each "sub-struct" isn't big, &nbsp 42494560/23120, ans = 1838.
I made a small experiment on R2013a, 64bit, Win7:
>> s
s =
a: 1
b: 2
c: 3
d: 4
s: [1x1 struct]
>> c = repmat( {s}, [1,231200] );
>> whos c s
Name Size Bytes Class Attributes
c 1x231200 617766400 cell
s 1x1 2560 struct
and displayed c in the Variable Editor
&nbsp
It's a bit sluggish (on my eight years old vanilla PC) but it works as expected.
Why not send your problem to tech support? If you have a student license they might not help you, but I think they should be interested.

Sign in to comment.

Categories

Asked:

on 10 Mar 2016

Edited:

on 12 Mar 2016

Community Treasure Hunt

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

Start Hunting!