[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Help with erase()
From: |
Carnë Draug |
Subject: |
Re: Help with erase() |
Date: |
Tue, 26 Dec 2017 10:33:15 +0000 |
On 26 December 2017 at 08:08, Steph Bredenhann <address@hidden> wrote:
> A better answer, using quotes
>
> clear all
>
> s = erase("this is it",["this";"is"])
> double (s)
>
>>> untitled2
>
> s =
>
> " it"
>
>
> ans =
>
> NaN
Can you try double quotes on the second argument but not on the
first. The reason why double(s) returns NaN is that it's a Matlab
string and not a char array.
s = erase ('this is it', ["this"; "is"])
double (s)
or
s = erase ('this is it', {'this'; 'is})
double (s)
Thank you
Carnë