[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #49696] Dimensions of the eval function string
From: |
Guillaume |
Subject: |
[Octave-bug-tracker] [bug #49696] Dimensions of the eval function string input |
Date: |
Thu, 24 Nov 2016 11:57:42 +0000 (UTC) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:49.0) Gecko/20100101 Firefox/49.0 |
URL:
<http://savannah.gnu.org/bugs/?49696>
Summary: Dimensions of the eval function string input
Project: GNU Octave
Submitted by: gyom
Submitted on: Thu 24 Nov 2016 11:57:39 AM GMT
Category: Octave Function
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Matlab Compatibility
Status: None
Assigned to: None
Originator Name: Guillaume
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: dev
Operating System: Any
_______________________________________________________
Details:
In Octave the string input of the eval function has to be a 1xN array while
Matlab allows 1xN and Nx1. Matlab throws an error if the input is MxN while
Octave will execute the first row.
Matlab:
>> str = 'disp(''hello'')'
str =
disp('hello')
>> eval(str)
hello
>> eval(str')
hello
>> str = strvcat('disp(''hello'')','disp(''hi'')')
str =
disp('hello')
disp('hi')
>> eval(str)
Error: Unexpected MATLAB expression.
>> eval(str')
Error: Unexpected MATLAB expression.
Octave:
> str = 'disp(''hello'')'
str = disp('hello')
> eval(str)
hello
> eval(str')
error: 'd' undefined near line 1 column 1
> str = strvcat('disp(''hello'')','disp(''hi'')')
str =
disp('hello')
disp('hi')
> eval(str)
hello
> eval(str')
error: 'dd' undefined near line 1 column 1
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?49696>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #49696] Dimensions of the eval function string input,
Guillaume <=