creating an empty column vector

Hi all,
I would like to create an empty column vector so as when I extract this vector to excel to see empty cells.

 채택된 답변

Oleg Komarov
Oleg Komarov 2012년 5월 24일

0 개 추천

cell(10,1)
Note that you can write to excel into a specific range, i.e. you don't need to add empty cell arrays to skip columns/rows.

댓글 수: 4

antonet
antonet 2012년 5월 24일
thank you. There a small problem. when i apply
[cell(10,1) data1] where "data1" is a matrix of numbers (including NaN) i get the following message
??? Error using ==> horzcat
CAT arguments dimensions are not consistent.
where is the mistake?
Oleg Komarov
Oleg Komarov 2012년 5월 24일
As the error says the cell(10,1) is a 10 by 1 cell array. Now, what size() is data1 and which type?
type
whos data1
antonet
antonet 2012년 5월 24일
cell is 144 by 1 adn data1 is 144 by 309. for example
data1=0.0019 0.0022 0.0017 0.0016 0.0014 0.0022 0.0120
0.0020 0.0018 0.0020 0.0018 0.0023 0.0017 0.0120
0.0005 0.0005 0.0005 0.0004 0.0003 0.0003 NaN
0.0005 0.0005 0.0005 0.0004 0.0003 0.0003 0.0500
0.0000 NaN NaN NaN NaN NaN 0.0820
NaN NaN
Oleg Komarov
Oleg Komarov 2012년 5월 25일
[cell() num2cell(data1)]

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Numeric Types에 대해 자세히 알아보기

태그

질문:

2012년 5월 24일

Community Treasure Hunt

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

Start Hunting!

Translated by