Matlab 字符串连接

网友投稿 728 2022-05-29

example1:

str = 'www' str = www >> str2 = 'hello' str2 = hello >> [str,str2] ans = wwwhello

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

example2:

>> str3 = 'welcome' str3 = welcome >> strcat(str,str3) ans = wwwwelcome

1

2

3

4

5

6

7

8

9

10

11

example3:

strcat({'red','yellow'},{'green','blue'}) ans = 'redgreen' 'yellowblue'

1

2

3

4

5

6

example4:

Matlab 字符串连接

>> strcat(['red','yellow'],['green','blue']) ans = redyellowgreenblue

1

2

3

4

5

6

遇到matlab里面的不懂的方法,第一方法应该是使用 help + 方法名,来看matlab文档。

example:

>> help strcat strcat - Concatenate strings horizontally This MATLAB function horizontally concatenates strings s1,...,sN. s = strcat(s1,...,sN) strcat 的参考页 另请参阅 cat, cellstr, horzcat, strjoin, vertcat % 点击 ** 的参考页 即可,查看详细文档 >> help exist exist - Check existence of variable, function, folder, or class This MATLAB function returns the status of name: exist name exist name kind A = exist('name','kind') exist 的参考页

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

MATLAB

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:微信支付签约委托代扣文档 - 月付会员或者定期支付服务 - APP纯签约
下一篇:【Layui】解决如何使用富文本编辑器和富文本上传显示图片
相关文章