could anyone help me how to convert the values in cell array into double.
    4 次查看(过去 30 天)
  
       显示 更早的评论
    
I am having cell array A=9x1 cell as
2x1 double - A{1,1} [1;2]
2x1 double - A{2,1} [5;6]
2x1 double - A{3,1} [8;5]
2x2 double - A{4,1} [1,3;5,6]
2x2 double -  A{5,1} [5,4;7,8]
2x2 double - A{6,1} [2,6;9,6]
2x3 double - A{7,1}[1,2,3;4,4,6]
2x3 double - A{8,1}[5,6,7;8,9,1]
2x3 double - A{9,1}[2,3,4;5,6,7]
I want to convert into two separate matrix as 
A1,     A2
[1        [2
5        6
8        5
1        5
3        6
5        7
4        8
2        9
6        6
1        4
2        4
3        6
5        8
6        9
7        1
2        5
3        6
4]        7]
Could anyone please help me on this to do.
0 个评论
采纳的回答
  Walter Roberson
      
      
 2021-6-25
        A{1,1} = [1;2];
A{2,1} = [5;6];
A{3,1} = [8;5];
A{4,1} = [1,3;5,6];
A{5,1} = [5,4;7,8];
A{6,1} = [2,6;9,6];
A{7,1} = [1,2,3;4,4,6];
A{8,1} = [5,6,7;8,9,1];
A{9,1} = [2,3,4;5,6,7];
A
temp = cell2mat(cellfun(@(M) M', A, 'uniform', 0))
A1 = temp(:,1)
A2 = temp(:,2)
更多回答(0 个)
另请参阅
类别
				在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

