Unexpected MATLAB operator error (struct array issue)

Error is assigned to ">> names":
doc mapshow
cd mapfiles
dir ('*.shp')
names = dir('*.shp');
>> names
names = 
  117×1 struct array with fields:
    name
    folder
    date
    bytes
    isdir
    datenum
>> for n = 1:length(names)
S = shaperead(names(n).name);
mapshow(S)
title(names(n).name)
drawnow
pause
[EDITED, Jan, code formatted]

1 件のコメント

Jan
Jan 2018 年 3 月 6 日
編集済み: Jan 2018 年 3 月 6 日
Where do you get which error message? Why do you assume that this is a "struct array issue"?

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

回答 (1 件)

Jan
Jan 2018 年 3 月 6 日

0 投票

Did you include the ">>" in the code of the function or script? If so, remove this, because this is the prompt in the command window, not a part of the code.

カテゴリ

ヘルプ センター および File Exchange で Structures についてさらに検索

タグ

質問済み:

2018 年 3 月 6 日

編集済み:

Jan
2018 年 3 月 6 日

Community Treasure Hunt

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

Start Hunting!

Translated by