Re: How to customize the output format of function 'dataset'?
- From: Peter Perkins <Peter.PerkinsRemoveThis@xxxxxxxxxxxxx>
- Date: Thu, 18 Oct 2007 11:13:22 -0400
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.
.
- References:
- How to customize the output format of function 'dataset'?
- From: Daniel
- Re: How to customize the output format of function 'dataset'?
- From: Peter Perkins
- Re: How to customize the output format of function 'dataset'?
- From: Daniel Mark
- How to customize the output format of function 'dataset'?
- Prev by Date: Interface Matlab with Rodhe & Schwarz AM300
- Next by Date: Re: Simulink block position
- Previous by thread: Re: How to customize the output format of function 'dataset'?
- Next by thread: Using feature('memstats') fails with 'An unknown feature was specified'
- Index(es):
Relevant Pages
|