Seperating a colum vector into different cells.
Show older comments
Hello. Can anybody help me? I have a force vector, that i want to seperate into vector or cells, (i need to acces each part individually), that go from peak to peak according to sample nr.. I have found the sample nr. as [307 584 872], and tried this function % c=mat2cell(Force,sampnr(1,1),sampnr(1,2));
Best Regards
Accepted Answer
More Answers (2)
Michael Haderlein
on 5 Sep 2014
Star Strider's solution will have the last value of fvc{n} to be the first value of fvc{n+1}. Is that intended? I understand the question the way that no value is repeated and the fv vector is just split into the fractions. Then it goes quite simple with
fc=mat2cell(fv,1,diff([0 fvd length(fv)]));
Anders Mahler
on 7 Sep 2014
0 votes
Categories
Find more on Data Type Conversion in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!