Variables deleting when in a function

2 ビュー (過去 30 日間)
Suzie Oman
Suzie Oman 2017 年 4 月 5 日
編集済み: Jan 2017 年 4 月 5 日
When I am running a function ( a 3 x 300 array), all but the first line is deleted. Does anyone know why this might happen?

回答 (1 件)

Jan
Jan 2017 年 4 月 5 日
編集済み: Jan 2017 年 4 月 5 日
No. The provided information does not allow to guess the reason, sorry. But you can find the problem using the debugger. Set a breakpoint in the first line of teh function. Then call the function and step through it line by line. Observe the concerned array in the WorkSpace-Browser to see, where the values are deleted.
Note: "A function" and a "3 x 300 array" are two different things. I assume, you call a function with a [3 x 300] matrix as input - correctly?

カテゴリ

Help Center および File ExchangeFunction Creation についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by