Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

how can get this numbers in to array and the text in another array

조회 수: 1 (최근 30일)
Laith Abualigah
Laith Abualigah 2015년 7월 21일
마감: MATLAB Answer Bot 2021년 8월 20일
{1212 1,1261 1,1342 1,1396 1,1432 1,1481 1,1753 1,2072 1,2422 1,3233 1,3596 2,3762 1,4147 1,4152 1,4216 Public_Health_and_Safety}
{167 1,660 1,719 1,975 1,1586 1,2059 1,2408 1,2605 1,2922 1,2985 1,3596 1,3775 1,4216 Public_Health_and_Safety}
{326 1,353 1,1271 1,1342 2,1396 1,1536 1,2077 1,2404 1,2408 1,2808 1,3288 1,3596 1,3650 1,3753 1,3890 1,4216 Public_Health_and_Safety}
{387 1,628 1,1029 1,1107 1,1342 1,1644 1,1679 1,2155 1,2237 1,2528 1,3288 1,3313 1,3629 1,3639 1,3762 1,3982 1,4216 Public_Health_and_Safety}
{311 1,954 1,1107 1,1147 1,1993 1,2197 1,2528 1,2808 1,3341 1,3639 1,3982 1,4216 Public_Health_and_Safety}
{887 2,1014 1,1252 1,1342 2,1363 1,1481 1,1689 1,2197 1,3049 1,3414 1,3678 1,3762 3,3982 1,4006 1,4048 1,4216 Public_Health_and_Safety}
{1342 1,1593 1 dsd}

답변 (2개)

Andrei Bobrov
Andrei Bobrov 2015년 7월 21일
A={{1212 1.1261 1.1342 1.1396 1.1432 1.1481 1.1753 1.2072 1.2422 1.3233 1.3596 2.3762 1.4147 1.4152 1.4216 'Public_Health_and_Safety'}
{167 1.660 1.719 1.975 1.1586 1.2059 1.2408 1.2605 1.2922 1.2985 1.3596 1.3775 1.4216 'Public_Health_and_Safety'}
{326 1.353 1.1271 1.1342 2.1396 1.1536 1.2077 1.2404 1.2408 1.2808 1.3288 1.3596 1.3650 1.3753 1.3890 1.4216 'Public_Health_and_Safety'}
{387 1.628 1.1029 1.1107 1.1342 1.1644 1.1679 1.2155 1.2237 1.2528 1.3288 1.3313 1.3629 1.3639 1.3762 1.3982 1.4216 'Public_Health_and_Safety'}
{311 1.954 1.1107 1.1147 1.1993 1.2197 1.2528 1.2808 1.3341 1.3639 1.3982 1.4216 'Public_Health_and_Safety'}
{887 2.1014 1.1252 1.1342 2.1363 1.1481 1.1689 1.2197 1.3049 1.3414 1.3678 1.3762 3.3982 1.4006 1.4048 1.4216 'Public_Health_and_Safety'}
{1342 1.1593 1 'dsd'}};
n = numel(A);
A1 = cell(n,1);
A2 = cell(n,1);
for jj = 1:n
    ii = cellfun(@isnumeric,A(jj){:});
    A1{jj} = cell2mat(A{jj}(ii));
    A2{jj} = A{jj}(~ii);
end

B.k Sumedha
B.k Sumedha 2015년 7월 21일
You can use the string split function for that seperation.See this particular mathworks page. http://in.mathworks.com/help/matlab/ref/strsplit.html

이 질문은 마감되었습니다.

태그

Community Treasure Hunt

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

Start Hunting!

Translated by