create a new cell array by repeating values

조회 수: 2 (최근 30일)
Elysi Cochin
Elysi Cochin 2017년 2월 15일
댓글: Elysi Cochin 2017년 2월 15일
i have a cell array with n columns... from this n values i want to create a new cell with "r" rows and "c" columns.... that repeat the cell values that much times i specify...

채택된 답변

KSSV
KSSV 2017년 2월 15일
편집: KSSV 2017년 2월 15일
doc repmat
r = cell(3,1) ;
r{1} = rand(10) ;
r{2} = rand(3,3) ;
r{3} = rand(5,4) ;
repamt(r,3,2)
  댓글 수: 5
KSSV
KSSV 2017년 2월 15일
How about this?
clc; clear all ;
r = cell(1,60) ;
for i = 1:60
r{i} = rand(25,25) ;
end
A = repmat({r},16,54) ;
Elysi Cochin
Elysi Cochin 2017년 2월 15일
sir now what we get is, each column of cell array A is a cell array
i want each column of cell array A as a matrix with size 25 x 25

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by