|
From: | Guillaume |
Subject: | [Octave-bug-tracker] [bug #60854] dec2hex with character input |
Date: | Tue, 29 Jun 2021 17:00:16 -0400 (EDT) |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0 |
URL: <https://savannah.gnu.org/bugs/?60854> Summary: dec2hex with character input Project: GNU Octave Submitted by: gyom Submitted on: Tue 29 Jun 2021 09:00:14 PM UTC 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 Release: dev Discussion Lock: Any Operating System: Any _______________________________________________________ Details: According to the Matlab documentation, the first input of dec2hex can be a character array: https://www.mathworks.com/help/matlab/ref/dec2hex.html#mw_7e982b61-105a-4d38-9301-a9f469b05bce and it will be converted as integers. >> dec2hex('.') ans = '2E' I would change the input conversion in dec2base.m: if (islogical (d) || ischar (d)) d = double (d); but the documentation mentions "dec2hex treats characters as their Unicode". _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?60854> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |