필터 지우기
필터 지우기

Dot indexing is not supported for variables of this type

조회 수: 16 (최근 30일)
Aminunt7
Aminunt7 2024년 5월 10일
답변: Steven Lord 2024년 5월 10일
Hello Everyone,
I am trying to implement a new stand alone function to load a mat file (which has 3 timeseries in it) : (for example: Data.Signal1.Data,) and plot it.
The App is functional within Matlab app designer, but when i build a stand alone application, this error occured:
Dot indexing is not supported for variables of this type.
Unfortunatly i can not find the solution for that. could you please help me about it?
properties (Access = public)
DataMeas = struct; % Description
end
% Button pushed function: OpenCalcmFile
function OpenCalcmFileButtonPushed(app, event)
[file,path] = uigetfile();
if isequal(file,0)
app.CalcmFilePath.Value = "";
else
app.CalcmFilePath.Value = append(path,file);
app.DataMeas = load(append(path,file));
end
function OpenMatFileButtonPushed(app, event)
plot(app.Plot_graph1,app.DataMeas.signal1.Data);
end
Error in log:
Dot indexing is not supported for variables of this type.
Error in TestAutomation/OpenMatFileButtonPushed (line 766)
Error in appdesigner.internal.service.AppManagementService/tryCallback (line 368)
Error in matlab.apps.AppBase>@(source,event)tryCallback(appdesigner.internal.service.AppManagementService.instance(),app,callback,requiresEventData,event) (line 37)
Error using matlab.ui.control.internal.controller.ComponentController/executeUserCallback (line 386)
Error while evaluating Button PrivateButtonPushedFcn.

답변 (1개)

Steven Lord
Steven Lord 2024년 5월 10일
If you are attempting to compile code using MATLAB Compiler that calls load to load an object from a MAT-file and there is no indication in the code itself that MATLAB Compiler needs to package the code, the dependency analyzer may not be able to detect that it needs to include the definition of the class. In this case use one of the workarounds in the "Callback Problems Due to Missing Functions" section of this documentation page, as this workflow is described by the Tip in that section of that documentation page.

카테고리

Help CenterFile Exchange에서 Entering Commands에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by