Problems with using "strmatch" in Matlab 2012a GUI

1 回表示 (過去 30 日間)
Zhuo Li
Zhuo Li 2012 年 6 月 28 日
Hi, I get an error message when I try to use "strmatch"
>> At compilation, "strmatch" was determined to be a variable and this variable is uninitialized. "strmatch" is also a function name and previous versions of MATLAB would have called the function. However, MATLAB 7 forbids the use of the same name in the same context as both a function and a variable.
I tried exactly same code in command window, and everything works fine.
index_trigger = strmatch('TRG',u(index_request,:));
but when I put it into gui, the error happens. I search out my code in my gui.m, and I didn't find anywhere strmatch appears as a variable.
Moreover, it seems this function will be removed from the future release. I really hope not ...
Could someone help me out? Thanks!
  2 件のコメント
Walter Roberson
Walter Roberson 2012 年 6 月 28 日
Do you happen to have a strmatch() on the left side of an "=" ? I have seen some people put it there in an attempt to assign to a substring of a string.
Zhuo Li
Zhuo Li 2012 年 6 月 28 日
Thank you Walter for your reminding. I checked several times, and finally found that I put a bracket right after my first index at one place. So, this is not a technical issue. Never mind. Thanks again.

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeCharacters and Strings についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by