当前位置:网站首页>Use of strjoin function in MATLAB
Use of strjoin function in MATLAB
2022-07-26 12:03:00 【jk_ one hundred and one】
Catalog
Use a blank list of join words
Join character vector cell arrays with delimiters
Join character vectors using multiple different delimiters
strjoin The function of the function is to join strings in an array .
grammar
str = strjoin(C)
str = strjoin(C,delimiter)explain
str = strjoin(C) By way of C The elements of are linked with spaces between consecutive elements , structure str.C It can be a character vector cell array or a string array .
str = strjoin(C,delimiter) By way of C Each element of the delimiter To construct str.
Example
Use a blank list of join words
Use a single white space to join the character vector cell array C Each character vector in .
C = {'one','two','three'};
str = strjoin(C)
str =
'one two three'Join character vector cell arrays with delimiters
Join the character vectors in the cell array into a character vector . Specify a comma followed by a space character as the separator .
C = {'Newton','Gauss','Euclid','Lagrange'}
C = 1x4 cell
{'Newton'} {'Gauss'} {'Euclid'} {'Lagrange'}
%%
str = strjoin(C,', ')
str =
'Newton, Gauss, Euclid, Lagrange'Join character vectors using multiple different delimiters
Specify several different delimiters in the character vector cell array .delimiter The cell array must contain more elements than C The number of elements contained is less than one .
C = {'one','two','three'};
str = strjoin(C,{' + ',' = '})
str =
'one + two = three'Input parameters
C - Input text
Input text , Designated as 1×n Character vector cell array or string array .
delimiter - Separator character
Separator character , Specify as character vector 、1×n Character vector cell array or 1×n Array of strings .
If delimiter Is a character vector , be strjoin By means of C Insert delimiter To form str.delimiter The input can include any of the following escape sequences :
\\
The backslash
\0
Null value
\a
alert
\b
Back space
\f
Page identifier
\n
A newline
\r
A carriage return
\t
Horizontal tabs
\v
Vertical tabs
If delimiter Is an array of character vector cells , Then it must contain more elements than C The number of elements contained is less than one . Each element in a cell array must be a character vector .strjoin Insert by interleaving delimiter and C To form str.delimiter All characters in are inserted as literal text , Escape sequence is not supported .
Tips
from R2016b Start , It is recommended to use join Function to join the elements of a string array .
边栏推荐
- Marriage seeking story
- CVPR 2022 单目深度估计新SOTA—NeW CRFs:Neural Window Fullyconnected CRFs
- What is per title encoding?
- Here blog: running a large language model in a production environment - overview of the reasoning framework
- Network protocol: tcp/ip protocol
- 【倒计时10天】腾讯云音视频专场即将见面,千元大奖等你来拿!
- 线上一个隐匿 Bug 的复盘
- 了解string类
- Talking about web vitals
- 代码实例详解【可重入锁】和【不可重入锁】区别?
猜你喜欢

什么是Per-Title编码?

MICCAI2022论文 | 进化多目标架构搜索框架:在COVID-19三维CT分类中的应用

3.2 create menu and game pages (Part 2)

The latest heart-shaped puzzle applet source code + with flow master

CVPR 2022 单目深度估计新SOTA—NeW CRFs:Neural Window Fullyconnected CRFs

Why BGP server is used in sunflower remote control? Automatic optimal route and high-speed transmission across operators

网络协议:TCP/IP协议

线上一个隐匿 Bug 的复盘

数智转型,管理先行|JNPF全力打造“全生命周期管理”平台

4.1 configure MySQL and register login module
随机推荐
Metauniverse gamefi chain game system development NFT Technology
Pytest interface automated test framework | fixture call fixture
空洞卷积详解(输入输出大小分析)
音视频+
一些实用、常用、效率越来越高的 Kubernetes 别名
C language code quantity statistical tool
浅谈低代码技术在物流运输平台中的搭建与管理
System call capture and analysis - ring layer kprobe hijacks system calls
大佬们,请教一下,我按照文档配了cdc连接oracle,总是运行报错找不到类 ValidstionE
Pytest interface automation test framework | use decorators to decorate the use cases that need to be run
There are various signs that apple is expected to support AV1
开放原子开源基金会OpenHarmony工作委员会主席侯培新寄语OpenAtom OpenHarmony分论坛
Pytest interface automated testing framework | pytest obtains execution data, and pytest disables plug-ins
基于STM32的SIM900A发送中文和英文短信
Why BGP server is used in sunflower remote control? Automatic optimal route and high-speed transmission across operators
什么是Per-Title编码?
线上一个隐匿 Bug 的复盘
面试官:如何处理高并发?
Introduction to FPGA (III) - 38 decoder
三维点云课程(八)——特征点匹配