photo

Petr


自 2013 起处于活动状态

Followers: 0   Following: 0

消息

Hello, I have a question about MEX and accessing data structures. There is a problem:
I have a matlab structure as follows
d(1).x=uint32([1 2 4]);
d(1).y=single([0.5 0.3 0.1]);
d(2).x=uint32([3 6 9 7 5 6]);
d(2).y=single([0.3 0.6 0.9 1.1 0.3 0.2];
...
d(n).x=uint32(...
d(n).y=single(...

The data structure is huge (~20GB) hence I wan to avoid to make a copy. I am not very familiar with MEX. How can I get pointers to data structure elements?

For instance to
d(2).x(5)
d(2).y(5)
d(1).x(2)
d(1).y(2)

The structure 'd' is in fact an inverted file structure of a sparse matrix and I will need to do some multiplications. Thank you!

统计学

MATLAB Answers

1 个提问
0 个回答

排名
129,729
of 301,009

声誉
0

贡献数
1 个提问
0 个回答

回答接受率
0.0%

收到投票数
0

排名
 of 21,133

声誉
N/A

平均
0.00

贡献数
0 文件

下载次数
0

ALL TIME 下载次数
0

排名

of 172,330

贡献数
0 个问题
0 个答案

评分
0

徽章数量
0

贡献数
0 帖子

贡献数
0 公开的 个频道

平均

贡献数
0 个亮点

平均赞数

Feeds

排序方式:

提问


MEX: pointers to a matlab structure
Hello, I have the following problem. There is a Matlab structure as follows: d(1).x=uint32([1 4 6 7 ]); d(1).y=s...

12 years 前 | 1 个回答 | 0

1

个回答