Re: How to customize the output format of function 'dataset'?



Daniel, I'm sorry, I misunderstood. It's line 85 of @dataset/disp that is where you want to go, I think. You could modify this line to

varChars = num2str(var,'%0.7g'); % or whatever

to get exactly the format you want. However, since this is in a class directory, you'll have to modify it in place, which requires appropriate privileges for your MATLAB install directory. It's possible to create a local _function_ (as opposed to method) called something like displayDataset, but you'd have to do some extra work as well. I can suggest how to do that if need be. I will make a note to look into enhancing the display method for the dataset in the future.

Just out of curiosity, would it be sufficient for your needs if the display respected the current setting of the FORMAT command (e.g., "format long g")?

- Peter Perkins
The MathWorks, Inc.
.



Relevant Pages

  • Re: UNION ALL Query
    ... how to bring over your formatted display using just the one field from each ... > format "NW-"0000, and for tblCustomOrders I used the ... > info from the unionquery to a tblMasterInventory. ... This doesn't modify ...
    (microsoft.public.access.queries)
  • Re: UNION ALL Query
    ... yes I did you a format for the ... >display of your autonumber fields. ... This doesn't modify ...
    (microsoft.public.access.queries)
  • Re: > 24:00
    ... I just tried Frank's format (I should have done that before posting what's ... and in fact it *will* display 0 for the day for a period less than ... and you don't need to modify the ... > But there's no way to set up a conditional number format that looks at B1 ...
    (microsoft.public.excel.worksheet.functions)
  • Re: never ending problems
    ... you're modifying a heading style. ... In the Modify Style dialog there is a Format button. ... Modify:>> Format: Paragraph applies only to paragraph formatting, ...
    (microsoft.public.word.numbering)
  • Re: Word Manuscript -> Book Format
    ... What you want to do is modify the styles. ... if your body text is 12 pt TNR in your manuscript but you want it ... > Suzanne S. Barnhill wrote: ... The manuscript is in A4 format, ...
    (microsoft.public.word.formatting.longdocs)