MATLAB GUI上でのコールバック関数操作
Mostrar comentarios más antiguos
MATLABコマンドライン上で、下記のコマンドを実施した場合にはエラーが出ず、plotが表示される。
d = readtable('motor2.xlsx');
ti = d( 2:630 ,1); %% 2~630 行目の1列目をt軸に
y2 = d( 2:630 ,6); %% 2~630 行目の6列目をy軸に
plot(ti,y2);
同じ記述を、GUIのbuttonのコールバック関数に記述するとエラーが出ます。
・コマンドライン上と同じように動作させるには何が必要でしょうか。
・2つの違いはなんでしょうか。
エラー内容
使い方によるエラー matlab.graphics.data.DataMap/addChannel
Invalid subscript for Y. table 変数の添字は、実数の正の整数を含む数値配列、logical 配列、文字ベクトル、string 配列、文字ベクト
ルの cell 配列、または 1 つ以上の変数名と一致する pattern スカラーである必要があります。
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre データ型の変換 en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!