Need to use some data out of a cell array for my pcread command

2 views (last 30 days)
hey guys, actually im using a cell array like C=(cloud1.pcd,cloud2.pcd,cloud3.pcd,...), all of this are pointclouds. so C(1,1) means cloud1.pcd
Now i need to use the pcread command to read every single part of the array and implement it in my System, unfortunatly i somehow cant use C(1,1) in my command
cloudC=pcread(['C:\users\CV-01\Desktop\C(1,1)'])
any clue how to avoid/use it? Kind regards Dominik

Answers (1)

Jan
Jan on 6 Jun 2018
Edited: Jan on 6 Jun 2018
C=(cloud1.pcd,cloud2.pcd,cloud3.pcd,...)
This is not a cell array. Do you mean a cell string, which contains file names?
C = {'cloud1.pcd', 'cloud2.pcd', 'cloud3.pcd'}
Or is cloud1 a struct and you want the field pcd?
Please post the inputs using valid Matlab syntax. Then the readers do not have to guess, what you want.
Then an answer might be:
cloudC = pcread(fullfile('C:\users\CV-01\Desktop\', C{1,1}))

Community Treasure Hunt

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

Start Hunting!