Borrar filtros
Borrar filtros

matrix dimensions are not equal

4 visualizaciones (últimos 30 días)
Jetty Rakesh Aditya
Jetty Rakesh Aditya el 19 de Oct. de 2020
Comentada: KSSV el 19 de Oct. de 2020
how to make two cells (having strings as elements) of different dimensions equal?

Respuestas (1)

KSSV
KSSV el 19 de Oct. de 2020
Read about strcat. If str is your string of size 1*2...to append zero at tne end use:
iwant1 = strcat(str,'0') % option 1
iwant2 = [str,'0'] % option 2
  2 comentarios
Jetty Rakesh Aditya
Jetty Rakesh Aditya el 19 de Oct. de 2020
i want to make two cells of different dimensions equal, i am sorry for wrongly mentioning it in the question
KSSV
KSSV el 19 de Oct. de 2020
You can use strcat for cells also.
str{1} = 'MA' ;
str{2} = 'LA' ;
iwant = strcat(str,'0')

Iniciar sesión para comentar.

Categorías

Más información sobre Weather and Atmospheric Science 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