Filter löschen
Filter löschen

How to replace a value for blank

25 Ansichten (letzte 30 Tage)
Tiago Dias
Tiago Dias am 2 Jan. 2018
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

Antworten (1)

Pawel Jastrzebski
Pawel Jastrzebski am 2 Jan. 2018
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);

Kategorien

Mehr zu Data Import from MATLAB finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by