Prev: imtransform misunderstanding
Next: No convergence at x0
From: Josef Sonderegger on 11 Nov 2009 20:20 I want some results shown in my guide using a uitable. The results are strings of different length. e.g. result = struct('number', {}, 'string', {}); and the results would be result(1) number: 1 string: '2,3,4' result(2) number: 2 string: '' result(3) number: 3 string: '1,7' .... At my uitable I would like my results shown like 1 '2,3,4' 2 '' 3 '1,7' set(handles.results, 'Data', result) how do I have to change this "default" set command to get the results into the uitable (if it is possible)?
From: Matthew Whitaker on 18 Nov 2009 12:57 You will have to convert your structure to a cell array like so: u = uitable; s = [{result.number}',{result.string}']; %forms a 3x2 cell set(u,'Data',s); Hope this helps Matt W "Josef Sonderegger" <joe(a)bastarde.at> wrote in message <hdfns3$4n$1(a)fred.mathworks.com>... > I want some results shown in my guide using a uitable. > > The results are strings of different length. > > e.g. > result = struct('number', {}, 'string', {}); > > and the results would be > result(1) > number: 1 > string: '2,3,4' > > result(2) > number: 2 > string: '' > > result(3) > number: 3 > string: '1,7' > > ... > > At my uitable I would like my results shown like > 1 '2,3,4' > 2 '' > 3 '1,7' > > set(handles.results, 'Data', result) > how do I have to change this "default" set command to get the results into the uitable (if it is possible)?
|
Pages: 1 Prev: imtransform misunderstanding Next: No convergence at x0 |