フィルターのクリア

Why doesn't my function work?

2 ビュー (過去 30 日間)
Sam
Sam 2015 年 1 月 7 日
回答済み: Image Analyst 2015 年 1 月 7 日
for welke_pp=1:5 for i_testen=1:5 function [LANK_1, LANK_2, LANK_3] = make_LANK(data_sts) LANK_1 = data_sts(welke_pp,i_testen).VideoSignals(:, strcmp('LANK', data_sts(welke_pp, i_testen).VideoSignals_headers),1); LANK_2 = data_sts(welke_pp,i_testen).VideoSignals(:, strcmp('LANK', data_sts(welke_pp, i_testen).VideoSignals_headers),2); LANK_3 = data_sts(welke_pp,i_testen).VideoSignals(:, strcmp('LANK', data_sts(welke_pp, i_testen).VideoSignals_headers),3); end end end
error: Function definitions are not permitted in this context.
data_sts is a struct. Maybe that is the problem?

回答 (1 件)

Image Analyst
Image Analyst 2015 年 1 月 7 日
You cannot define a function inside a for loop.

カテゴリ

Help Center および File ExchangeLoops and Conditional Statements についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by