Indexing for .NET objects in MATLAB

조회 수: 4 (최근 30일)
Ranjith
Ranjith 2012년 12월 14일
I'm programming a camera whose vendor has provided me with the .NET libraries for accessing the methods. I added the third party assemblies, instantiated the objects as given in the help notes. I'm able to access the properties/methods as advertised.
I ran into the following error when trying to access one of the methods. I was able to get the value returned but not set it
pmSetupObj.ExposureTime(1)
ans =
100
pmSetupObj.ExposureTime(1) = 200 Array formation and indexing are not allowed on .NET objects.
Any pointers to fix this issue, I used NET.createArray to little effect as well.
thanks -R

답변 (1개)

Dale
Dale 2013년 2월 20일
To set the the exposure time using the ExposureTime method you need to include the desired exposure time as an argument to the method. For example pmSetupObj.ExposureTime(1,200) will set the exposure time to 200ms.

카테고리

Help CenterFile Exchange에서 Get Started with Microsoft .NET에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by