Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Help using textscan or sscanf
Replies: 21   Last Post: Jan 23, 2013 4:02 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
dpb

Posts: 8,106
Registered: 6/7/07
Re: Help using textscan or sscanf
Posted: Jan 16, 2013 5:33 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On 1/16/2013 4:11 PM, Kevin Ellis wrote:
> dpb <none@non.net> wrote in message <kd77v0$rlu$1@speranza.aioe.org>...
>> On 1/16/2013 3:21 PM, Kevin Ellis wrote:
>> ...
>>

>> > Thanks for attempting the solution....
>>
>> What was wrong with it, specifically?
>>
>> --

>
> Adding zeros to the shorter account numbers is easy to do, but I didn't
> understand how the zeros would "be sorted out" and what specific
> function would do that (sscanf?,textscan?).


You wouldn't have to, that was just an optional suggestion.

Whether it is a good idea or not is dependent on what you do w/ the
account numbers later on--if they're just arbitrary numbers and nothing
is done with them in database searches or somesuch then it may make no
difference--often, however, folks do things like sort if there is some
sort of a key that caused a given number to be generated or the like.
It would be entirely dependent upon the application. There's some
symmetry in having a consistent length--again whether it's of any value
for reports, etc., is application-dependent.

The solution I gave reproduced your values for your sample set afaik. I
was wondering what was wrong with it that you weren't apparently
satisfied and went to something else you said you didn't like.

--



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.