Filter löschen
Filter löschen

matrix dimensions are not equal

4 Ansichten (letzte 30 Tage)
Jetty Rakesh Aditya
Jetty Rakesh Aditya am 19 Okt. 2020
Kommentiert: KSSV am 19 Okt. 2020
how to make two cells (having strings as elements) of different dimensions equal?

Antworten (1)

KSSV
KSSV am 19 Okt. 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 Kommentare
Jetty Rakesh Aditya
Jetty Rakesh Aditya am 19 Okt. 2020
i want to make two cells of different dimensions equal, i am sorry for wrongly mentioning it in the question
KSSV
KSSV am 19 Okt. 2020
You can use strcat for cells also.
str{1} = 'MA' ;
str{2} = 'LA' ;
iwant = strcat(str,'0')

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Weather and Atmospheric Science finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by