|
From: | Nicholas Jankowski |
Subject: | Re: find subvector with findstr / strfind |
Date: | Wed, 17 Feb 2016 09:33:57 -0500 |
Hello,
I used to locate a sequence of numbers in a longer vector via findstr(),
e.g.
findstr( [3 4 5 3 4] , [3 4] )
ans = 1 4.
Today I came across the information that findstr() is scheduled for
deprecation and one should use strfind() instead.
However, trying
strfind( [3 4 5 3 4] , [3 4] )
results in:
error: strfind: PATTERN must be a string or cell array of strings.
Will non-strings be supported in a future version of strfind() or should I
use another approach for finding subvectors?
My octave version is 4.0.0 on Win7.
Best regards,
Ingo
PS: In Matlab 2012 strfind() as well as findstr() can be used with
non-strings.
[Prev in Thread] | Current Thread | [Next in Thread] |