Borrar filtros
Borrar filtros

How to replace a value for blank

25 visualizaciones (últimos 30 días)
Tiago Dias
Tiago Dias el 2 de En. de 2018
Respondida: Pawel Jastrzebski el 2 de En. de 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

Respuestas (1)

Pawel Jastrzebski
Pawel Jastrzebski el 2 de En. de 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);

Categorías

Más información sobre Data Import from MATLAB en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by