mysterious reason for CAT error when defining cell array

1 次查看(过去 30 天)
hi,
i'm trying to create a cell array that contains a bunch of filenames that i need to read later, by saying:
filenamelist = {...
'011_tempZdata_Hr3_1x_Hw100_split_5Px140W_C8Wm2_PCFW1111_U2026_dT05' ... '012_tempZdata_Hr3_1x_5Px140W_C8Wm2_PCFW1111_U1263_dT08' ... '013_tempZdata_Hr3_1x_Hw100_split_5Px140W_C8Wm2_PCFW1111_U0842_dT12' ... '081_tempZdata_Hr3_1x_Hw100_split_5Px70W_C4Wm2_PCFW1111_U1010_dT05' ... %'083_tempZdata_Hr3_1x_Hw100_split_5Px70W_C4Wm2_PCFW1111_U04081_dT12' ... '021_tempZdata_Hr3_2x_Hw100_split_5Px140W_C8Wm2_PCFW1111_U1011_dT05' ...
};
where the line that has been commented out is a filename that i don't want matlab to read for now.
unfortunately, when i try to do it, i get the following message: Error using ==> vertcat CAT arguments dimensions are not consistent.
however, when i say
a = {'a' ...
%,hlkjasdfhlisdfh ...
'bb'};
i don't get any error message whatsoever.
the following will not return an error either:
filenamelist = {...
'011_tempZdata_Hr3_1x_Hw100_split_5Px140W_C8Wm2_PCFW1111_U2026_dT05' ... '012_tempZdata_Hr3_1x_5Px140W_C8Wm2_PCFW1111_U1263_dT08' ... '013_tempZdata_Hr3_1x_Hw100_split_5Px140W_C8Wm2_PCFW1111_U0842_dT12' ... '081_tempZdata_Hr3_1x_Hw100_split_5Px70W_C4Wm2_PCFW1111_U1010_dT05' ... '021_tempZdata_Hr3_2x_Hw100_split_5Px140W_C8Wm2_PCFW1111_U1011_dT05' ...
% '083_tempZdata_Hr3_1x_Hw100_split_5Px70W_C4Wm2_PCFW1111_U04081_dT12' ...
};
What am I overlooking??!! HELP!!!

采纳的回答

Walter Roberson
Walter Roberson 2011-7-15
  1 个评论
Maria Alejandra Menchaca Brandan
Thanks a lot!
You have no idea how much time we spent trying to figure that one out.
Yes, the solution of getting rid of the '...' is the most suitable for me.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Multidimensional Arrays 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by