Matlab help — How to replace a word using findstr?

  • Context: MATLAB 
  • Thread starter Thread starter tdang
  • Start date Start date
  • Tags Tags
    Matlab
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
2 replies · 2K views
tdang
Messages
1
Reaction score
0
TL;DR
How to replace a word using findstr
Matlab help!
Hello
I want to create a sentence 2

sen1: I love flower
str1: love
str2: hate

How can I create sen2= "I hate flower" using findstr and array concatenation?
 
Physics news on Phys.org
There is an extrensive documentation from Matlab on strings here which should cover everything you need. Take a look at strrep for example.
 
Reply
  • Like
Likes   Reactions: FactChecker