How to get the address of libpointer?

조회 수: 2 (최근 30일)
huachun chen
huachun chen 2020년 1월 14일
답변: Steven Lord 2020년 1월 14일
I can get the values through the get method.
x=[1 4 5];
xPtr=libpointer('doublePtr',x);
get(xPtr,'value')
How to get the address of libpointer?

답변 (1개)

Steven Lord
Steven Lord 2020년 1월 14일
Why do you need or want to get the address?
If you're looking to iterate through the array, just use the + operator as shown by the examples on this documentation page. Using your original example, try:
get(xPtr+1, 'value')

카테고리

Help CenterFile Exchange에서 Call C from MATLAB에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by