I done number plate extraction and recognition and want to check the output having Pwdsymbol or not. Obtained output is PwDsymbol012345. How can i do it?

1 Kommentar

Walter Roberson
Walter Roberson am 1 Feb. 2018
Are you trying to determine whether the 9-character string 'Pwdsymbol' occurs somewhere within a string?

Melden Sie sich an, um zu kommentieren.

 Akzeptierte Antwort

Walter Roberson
Walter Roberson am 1 Feb. 2018

0 Stimmen

s='PwDsymbol012345';
locations = strfind(s, 'PwDsymbol');
if isempty(locations)
disp('string did not have PwDsymbol anywhere')
else
disp('PwDsymbol found starting at locations'), locations
end

4 Kommentare

SHOBA MOHAN
SHOBA MOHAN am 1 Feb. 2018
Thanks Walter. it works.
SHOBA MOHAN
SHOBA MOHAN am 1 Feb. 2018
Now, its displayed in the command prompt.I want to print the 'string did not have PwDsymbol anywhere'statement in notepad. Can you help me?
Walter Roberson
Walter Roberson am 1 Feb. 2018
... but I would suggest that perhaps this is not what you want to do. I would suggest that instead at most you want to use fopen() and fprintf() and fclose()
SHOBA MOHAN
SHOBA MOHAN am 4 Feb. 2018
Thanks walter. i done it.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Characters and Strings finden Sie in Hilfe-Center und File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by