Resolve: "Dot indexing is not supported for variables of this type."
4 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
回答(1 个)
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 个评论
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 Center 和 File Exchange 中查找有关 Interactive Control and Callbacks 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!