Resolve: "Dot indexing is not supported for variables of this type."

조회 수: 4 (최근 30일)
Palguna Gopireddy
Palguna Gopireddy 2024년 7월 8일
편집: Keshav 2024년 7월 12일
Hi
I am using MATLAB online. I am getting the following error
Warning: The JavaFrame figure property will be removed in a future release. For more information see UI Alternatives for MATLAB Apps on mathworks.com. > In rawDataReader>initDisplayPage (line 714)
In rawDataReader (line 165)
Dot indexing is not supported for variables of this type.
Error in rawDataReader>initDisplayPage (line 716)
jframe.setFigureIcon(jIcon);
Error in rawDataReader (line 165)
ui.figHandle = initDisplayPage(setupJSON.mmWaveDevice);
Here is the code in line 165 of rawDataReader
ui.figHandle = initDisplayPage(setupJSON.mmWaveDevice);
"setupJSON" variable is created using below line
setupJSON = jsondecode(fileread('2024_July_07_setup.setup.json'));
Here is the content of file '2024_July_07_setup.setup.json'
{
"createdByVersion": "2.1.0",
"createdOn": "2024-07-07T11:52:19.6750601+05:30",
"configUsed": "./data_and_related_files/2024_July_07_mmWave.mmwave.json",
"captureHardware": "DCA1000",
"DCA1000Config": {
"dataLoggingMode": "raw",
"dataTransferMode": "LVDSCapture",
"dataCaptureMode": "ethernetStream",
"packetSequenceEnable": 1,
"packetDelay_us": 25
},
"mmWaveDevice": "awr1843",
"operatingFreq": 77,
"mmWaveDeviceConfig": {
"RS232COMPort": "COM9",
"RS232BaudRate": "921600",
"radarSSFirmware": "xwr18xx_radarss.bin",
"masterSSFirmware": "xwr18xx_masterss.bin"
},
"capturedFiles": {
"numFilesCollected": 1,
"fileBasePath": "./data_and_related_files",
"files": [
{
"rawFileName": "adc_data_Raw_0.bin",
"processedFileName": "2024_July_07_adc_data_256Samples_128Loops_1000Frames.bin",
"processedFileSummary": {
"numZeroFillBytes": 0
}
}
]
}
}
How to resolve this error

답변 (1개)

Catalytic
Catalytic 2024년 7월 8일
You need to stop the code at rawDataReader>initDisplayPage (line 716) and examine what type of variable jframe is. According to the error message, you will find that it is not a type of variable for which 'jframe.setFigureIcon' makes sense.
  댓글 수: 2
Palguna Gopireddy
Palguna Gopireddy 2024년 7월 8일
편집: Palguna Gopireddy 2024년 7월 8일
The "jframe" variable is formed like this.
function [figHandle] = initDisplayPage(platformType)
global ui
%Setup the main figure
figHandle = figure(1);
clf(figHandle);
set(figHandle,'Name',strcat('Texas Instruments mmWave device - ', upper(platformType), ' Post Processing Tool'),'NumberTitle','off');
warning off MATLAB:HandleGraphics:ObsoletedProperty:JavaFrame
jframe=get(figHandle,'javaframe');
jIcon=javax.swing.ImageIcon('texas_instruments.gif');
jframe.setFigureIcon(jIcon);
So I think "jframe" variable is used in plotting.
I am able to run the program by just commenting the line
%jframe.setFigureIcon(jIcon);
Didn't need to stop the code. The program is showing some plots like below and the program is running until the stop button is pressed. I think the plots are running java.
But still this waring is appearing
Warning: The JavaFrame figure property will be removed in a future release. For more information see UI Alternatives for MATLAB Apps on mathworks.com. > In rawDataReader>initDisplayPage (line 714)
In rawDataReader (line 165)
Never plotted something likethis using java in MATLAB. I searche matlab documents and forum. Found that it is used to replace the figure icons. How to replace MATLAB icon from a figure window? - MATLAB Answers - MATLAB Central (mathworks.com)
I think this dot indexing error is appeaing because of "jframe.setFigureIcon(jIcon)", I thought because of "ui.figHandle = initDisplayPage(setupJSON.mmWaveDevice);"
still like to know what caused this error. (I am using MATLAB online)
Keshav
Keshav 2024년 7월 12일
편집: Keshav 2024년 7월 12일
Hi,
You are receiving the error message "Dot indexing is not supported for variables of this type" because the variable "jframe" in your code is an empty array.
The following code is returning an empty array in MATLAB Online.
get(figure(1), 'javaframe')
As a result, the variable "jframe" is an empty array, and you cannot access any properties of an empty array.
I hope the above explanation answers your query.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by