How to replace a value for blank
조회 수: 25 (최근 30일)
이전 댓글 표시
Hello, I have a excel sheet with 3 columns, 1st is with time, and 2nd and 3rd with variable values X1 and X2.
What i want to do is, in column 2 replace the 5th valur for "blank" and in column 3 the 10th value for "blank" as well.
% code
A=readtable('experiencia.xlsx');
[n,m] = size(A);
for i=1:n
A{5,2}= %something to make blank
A{10,3}= %something to make a blank
end
another thing, when i use
% code
A=xlsread('experiencia.xlsx');
end
the 1st column from the picture does not appear
And when i use % code A=readtable('experiencia.xlsx'); end
it apears the table like the picture, but i cant do nothing
Thanks for your help
댓글 수: 0
답변 (1개)
Pawel Jastrzebski
2018년 1월 2일
If you import the data as a table, I don't think you are allowed to have a 'blank values'.
Consider a following example:
clear all;
clc;
t = readtable('example.xlsx');
The output will be:
It is possible to 'blank' the cell when you turn the Table in into Cell array:
clear all;
clc;
t = readtable('example.xlsx');
tC = table2cell(t);
tC{3,1} = [];
xlswrite('example1.xlsx', tC);
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Import from MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!