"Attempt to reference field of non-structure array" error when using Makemid Command
조회 수: 2 (최근 30일)
이전 댓글 표시
I am trying to use makemid for creating MATLAB instrument driver for my Rohde and Schwarz Signal Analyzer. I have installed the IVI driver for the same. It gives me the following error "Attempt to reference field of non-structure array" error!. I am unable to understand what causes this error.
the syntax for using makemid command is makemid('Driver name','file name')
댓글 수: 0
채택된 답변
Luuk van Oosten
2016년 9월 19일
I'm not really sure, because your question does not give much specific information about your situation (such as the actual name of the driver, that would be nice to have). My best guess: you are trying to access some kind of driver file using this thing you provided:
makemid('Drivername','filename')
And the following is the case:
It could be that in your 'filename' you have for example the full path of your file as follows:
'C:/whatever/your/folder/is/where/that/driver/is/located/yourfilename.mdd'
If your file is not a file with the extention .mdd, but for example a .txt file, this could give erros if you do not specify the file extention in the filed 'type'. Another possibility is that the name of your file 'yourfilename' accidentally contains a dot (i.e.: 'your.filename.mdd'). That might cause MATLAB to read it as a struct (while it is not) and therefore throws you an error.
댓글 수: 3
Luuk van Oosten
2016년 9월 19일
It should not really matter, if you would do the following:
makemid('RsFs');
It makes the driver in the current working directory.
If you would do the following:
makemid('RsFs','C:/etc/etc/RsFs.mdd)
The driver 'RsFs' driver should be put into that folder.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Instrument Control Toolbox Supported Hardware에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!