Dot indexing Error Running Script on Matlab Production Server
조회 수: 1 (최근 30일)
이전 댓글 표시
Hello,
I load a .mat file from a script running on Matlab Production Server. The file contains a struct.
Running on my desktop, I can access values in the structure like this:
histo_test = dataset_loaded(3).volfeats_EWM_histo.Values(2:10);
But on Matlab Production Server, that line of code produces this error:
'Dot indexing is not supported for variables of this type.'
I know the the structure loads correcly because the length of the structure is correct.
How can I access the parameters of a structure from a script running on Matlab Production Server?
댓글 수: 0
답변 (1개)
Kojiro Saito
2020년 6월 26일
After reading this question, I think this issue might be because you're loading a mat file with an output argument.
dataset_load = load('dataset_scaled_fixedBins.mat');
So, you can access the original structure data by accessing dataset_load.dataset_load.
dataset_loaded = dataset_load.dataset_load;
histo_test = dataset_loaded(3).volfeats_EWM_histo.Values(2:10);
댓글 수: 2
Kojiro Saito
2020년 6월 29일
Are there any data type difference in MATLAB desktop and MATLAB Production Server?
You can find data types by whos command
dataset_load = load('dataset_scaled_fixedBins.mat');
dataset_loaded = dataset_load.dataset;
dataset_length = size(dataset_loaded);
whos dataset_loaded
And you can find whos results in main.log of Production Server.
참고 항목
카테고리
Help Center 및 File Exchange에서 Matrix Indexing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!