MATLAB: strfind (look for a string within strings)

Опубликовано: 11 Октябрь 2024
на канале: Engineering with Dr. Kelsey Joy
503
18

This short covers the MATLAB built-in function STRCMP() used for comparing strings.

STRFIND() is a function that you can use to locate a string within strings. It results in the location of the strings. CONSTAINS on the other hand results in a logical 1 (TRUE) or 0 (FALSE) instead of a vector of string locations.

CONTAINS() is a similar function that you can use to locate a string within strings, check out this video on it:    • MATLAB: contains (look for a string w...  

For a more detailed discussion around the strfind and contains functions, check out this video:    • MATLAB: String Functions - contains/s...  

STRCMP() is a similar function that compares the whole string and is case sensitive, check out this video on it:    • MATLAB: strcmp (compare strings)  

STRCMPI() is a string function that is not case sensitive, check out this video on it:    • MATLAB: strcmpi (compare strings)  

STRNCMP() is a string function that you can specify how much of the strings you want to compare, check out this video on it:    • MATLAB: strncmp (compare part of stri...  

STRNCMPI() is a string function that is not case sensitive and you can specify how much of the strings you want to compare, check out this video on it:    • MATLAB: strncmpi (compare part of str...  

Check out this playlist of string function videos:    • MATLAB String Functions series  

Check out this playlist of MATLAB shorts:    • MATLAB shorts  

For a full MATLAB tutorial, check out this playlist:    • How to Create Programs in MATLAB (tut...