Prev: Simpson's 1/3rd Rule and 3/8th Rule
Next: rand function
From: Petra on 16 May 2010 07:53 Hi all I tried to print different strings with exactley the same length. So when I try to print them one under the other every word has to start at the same position as one above. In this example "test" is not under "try ..." This example could show you my problem: str_listbox1={sprintf(' %s %s %5.1f %5.1f %5.1f',char('TEST'),char('try it first'),5.433,4.2,1)} str_listbox2={sprintf(' %s %s %5.1f %5.1f %5.1f',char('.... 12'),char('test'),5.433,4.2,1)} h_listbox = uicontrol('Style','listbox','Position', [20 250 400 70],'String',[str_listbox1,str_listbox2]) the listbox printing is terrible, even though the printing in the command window ist o.K.
From: Petra on 16 May 2010 08:03 Please klick the "original format" then copy the example to an .m file
From: ImageAnalyst on 16 May 2010 09:29 Try changing to a mono-spaced font, like Courier. It's probably the proportional spaced font that is messing you up.
|
Pages: 1 Prev: Simpson's 1/3rd Rule and 3/8th Rule Next: rand function |