How can I convert double value to cell?
52 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Mira le
el 25 de Ag. de 2021
Editada: Awais Saeed
el 25 de Ag. de 2021
Hello every one
I want to convert double value in cell in order to compare with each other
for example I have the cell array S={2 3, 1 4 , 1 2 5}
S{1}=2 3
S{2} = 1 4
S{3} = 1 2 5
and
double values are taking from matrix
t(1,2)=3;
the comparison will effect with each cell value from S with each double value from matrinx t
How can I do it
Thank you
0 comentarios
Respuesta aceptada
Awais Saeed
el 25 de Ag. de 2021
Editada: Awais Saeed
el 25 de Ag. de 2021
There are multiple ways
t = magic(5); % double
% method one. Convert single element
x = t(1,2)
x = num2cell(x)
% method two. Use curly braces
x = {t(1,2)}
% method three. Convert whole matrix into cell
num2cell(t)
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Logical 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!