MATLAB Answers

How to get the address of libpointer?

4 views (last 30 days)
huachun chen
huachun chen on 14 Jan 2020
Answered: Steven Lord on 14 Jan 2020
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?

  0 Comments

Sign in to comment.

Answers (1)

Steven Lord
Steven Lord on 14 Jan 2020
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')

  0 Comments

Sign in to comment.

Sign in to answer this question.

Tags

Products