フィルターのクリア

How to replace a value for blank

25 ビュー (過去 30 日間)
Tiago Dias
Tiago Dias 2018 年 1 月 2 日
回答済み: Pawel Jastrzebski 2018 年 1 月 2 日
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

回答 (1 件)

Pawel Jastrzebski
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);

カテゴリ

Help Center および File ExchangeData Import from MATLAB についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by