From octave-maintainers-request at octave dot org Thu Apr 22 10:41:11 2004 Subject: What is the correct NDArray behavior of printf? From: David Bateman To: maintainers at octave dot org Date: Thu, 22 Apr 2004 17:36:29 +0200 The behavior of Matlab for printf, kron etc, is to horizontally or vertically stack the 2-D cuts of the NDArray objects. Thus in matlab a = [1, 2; 3, 4]; a(:,:,2) = [5, 6; 7, 8]; sprintf('%f %f\n', a) is legal and give ans = 1.000000 3.000000 2.000000 4.000000 5.000000 7.000000 6.000000 8.000000 However, printf etc in octave called with NDArray arguments gives an error (when trying to transpose the NDArray). What is the correct behavior for these functions called with NDArrays? Is the Matlab behavior of reducing these arrays to 2-D objects the way to go? This affects quite a few functions in octave, and I'm not particularly happy with the matlab format. Does anyone have any thoughts on what is the correct behavior? Regards D. = -- David Bateman David dot Bateman at motorola dot com Motorola CRM +33 1 69 35 48 04 (Ph) Parc Les Algorithmes, Commune de St Aubin +33 1 69 35 77 01 (Fax) 91193 Gif-Sur-Yvette FRANCE The information contained in this communication has been classified as: [x] General Business Information [ ] Motorola Internal Use Only [ ] Motorola Confidential Proprietary