[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #59113] Warning when String property of a uico
From: |
Guillaume |
Subject: |
[Octave-bug-tracker] [bug #59113] Warning when String property of a uicontrol is a char array |
Date: |
Mon, 14 Sep 2020 12:53:37 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0 |
Follow-up Comment #2, bug #59113 (project octave):
Thanks, Rik. When looking into uicontrol to see where the warnings were coming
from, I noticed this:
strcmp(char({'a','b'}),'a')
strcmp({char({'a','b'}),'a'},'a')
strcmp(char({'a','b'}),{char({'a','b'}),'a'})
Octave returns:
>> strcmp(char({'a','b'}),'a')
ans = 0
>> strcmp({char({'a','b'}),'a'},'a')
warning: multi-row character matrix converted to a string, only the first row
is used
ans =
1 1
>> strcmp(char({'a','b'}),{char({'a','b'}),'a'})
warning: multi-row character matrix converted to a string, only the first row
is used
ans =
1 0
while Matlab returns:
>> strcmp(char({'a','b'}),'a')
ans =
logical
0
>> strcmp({char({'a','b'}),'a'},'a')
ans =
1x2 logical array
0 1
>> strcmp(char({'a','b'}),{char({'a','b'}),'a'})
ans =
1x2 logical array
0 0
I'll open a separate bug report for pipe-delimited strings.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?59113>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #59113] Warning when String property of a uicontrol is a char array, Guillaume, 2020/09/14
- [Octave-bug-tracker] [bug #59113] Warning when String property of a uicontrol is a char array, Rik, 2020/09/14
- [Octave-bug-tracker] [bug #59113] Warning when String property of a uicontrol is a char array,
Guillaume <=
- [Octave-bug-tracker] [bug #59113] Warning when String property of a uicontrol is a char array, Rik, 2020/09/14
- [Octave-bug-tracker] [bug #59113] Warning when String property of a uicontrol is a char array, Guillaume, 2020/09/14
- [Octave-bug-tracker] [bug #59113] Warning when String property of a uicontrol is a char array, Rik, 2020/09/14
- [Octave-bug-tracker] [bug #59113] Warning when String property of a uicontrol is a char array, Rik, 2020/09/14
- [Octave-bug-tracker] [bug #59113] Warning when String property of a uicontrol is a char array, Guillaume, 2020/09/15
- [Octave-bug-tracker] [bug #59113] Warning when String property of a uicontrol is a char array, Markus Mützel, 2020/09/21
- [Octave-bug-tracker] [bug #59113] Warning when String property of a uicontrol is a char array, Rik, 2020/09/21
- [Octave-bug-tracker] [bug #59113] Warning when String property of a uicontrol is a char array, Rik, 2020/09/22