在Matlab中查找字符串中的特定字符 [英] Finding a specific character in a string in Matlab

查看:763
本文介绍了在Matlab中查找字符串中的特定字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我有一个字符串'johndoe@hotmail.com'.我想将"@"之前和之后的字符串存储为2个单独的字符串.在字符串中查找"@"字符或其他字符的最简单方法是什么?

Suppose I have a string 'johndoe@hotmail.com'. I want to store the string before and after "@" into 2 separate strings. What would be the easiest method of finding the "@" character or other characters in the string?

推荐答案

我改用Matlab的strtok和strrep.

I used strtok and strrep from Matlab instead.

这篇关于在Matlab中查找字符串中的特定字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆