필터 지우기
필터 지우기

How I can separate number behind comma in columns at cell array

조회 수: 3 (최근 30일)
Eduard Sláma
Eduard Sláma 2017년 8월 8일
댓글: José-Luis 2017년 8월 10일
Hi, I have problem and I dont know how solve it.
Problem is: I have Data in cell format 5x1 cell Data={15; 25; 18,2,3; 35} and I need Data like a matrix which will have numbers separate by comma in diferent columns so first column will [15; 25; 18; 35;] second column [NaN; NaN; 2; NaN] third column [NaN; NaN; 3; NaN] My file have 300 000 rows so I need some function.
Thank you very much for your reponse
Btw: I have matlab version R2012b

채택된 답변

Stephen23
Stephen23 2017년 8월 8일
편집: Stephen23 2017년 8월 8일
Download Jos's excellent padcat from FEX:
>> Data = {15;25;[18,2,3];35};
>> padcat(Data{:})
ans =
15 NaN NaN
25 NaN NaN
18 2 3
35 NaN NaN
  댓글 수: 5
Eduard Sláma
Eduard Sláma 2017년 8월 10일
I solved this finnaly. But you have true next time I have to more specific my problem, but I am little confused in work with cell so sorry :)) Anyway thx for your response :)
José-Luis
José-Luis 2017년 8월 10일
The common way of expressing thanks is to Accept an answer once your problem is solved.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by