How to convert a cell to a string?

5 visualizaciones (últimos 30 días)
Lexington Stoyell
Lexington Stoyell el 14 de Feb. de 2018
Editada: Jan el 20 de Feb. de 2018
I have attempted to convert a cell to a string using cellstr (which doesn't work)... I need a column of cells (all containing numbers) to be strings so I can manipulate them. Thank you!
  7 comentarios
Jan
Jan el 20 de Feb. de 2018
Editada: Jan el 20 de Feb. de 2018
@Lexington Stoyell: Flags are used to mark inappropriate message, but Birdman ask you to provide your input, such that the readers can help you. Therefore I've removed your flag "Um why?". The answer is trivial: Because Birdman wants to help you and needs details to do so.
You do not tell us, what exactly your inputs are and what the error message is - although you have been asked for this twice already. This makes it hard to help you.
The column is said to be a cell.
Please explain this clearly. Who said what?
I want to convert this to a string so I can then use strsplit() and use
the comma as a delimiter to split the column into two different columns.
This is not clear also. There is no unique conversion of a cell, which contains numbers to a string. There is no need to concatenate the converted numbers only to split them afterwards.
[~, ~, dat] = xlsread('My_File.xlsx');
A = Value_Col;
B = Limits_Col;
H = cellstr(B);
What is the purpose of this code? dat is not used. Value_Col and Limits_Col are defined elsewhere and I cannot even guess, what they contain.
This is your 3rd thread about this topic and you still do not answer the questions for clarifications. See Question 382677 and Question 382677.
Please post your input and tell us exactly, what you want as output. Leave the idea of "splitting a column into 2 columns at the comma", because this is not meaningful. Vectors do not contain commas, but they are inserted for a better display on the screen only. Show us the contents of the Excel file and explain, what you want to achieve.
Lexington Stoyell
Lexington Stoyell el 20 de Feb. de 2018
I want to ensure that the values (shown in the Excel picture) are between the upper and lower limits, which could be an array/matrix...for this reason I want to split the cell depending on comma placement. I am also unsure how to compare the cells using greater than or less than.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Characters and Strings en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by