Help with sscanf

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Help with sscanf

Rik-4
Could someone with access to Matlab try the following?

[a,b,c,d] = sscanf ('1Inf2', '%f')
[a,b,c,d] = sscanf ('1Infinity2', '%f')

Thanks,
Rik

Reply | Threaded
Open this post in threaded view
|

Re: Help with sscanf

PhilipNienhuis
Rik-4 wrote
> Could someone with access to Matlab try the following?
>
> [a,b,c,d] = sscanf ('1Inf2', '%f')
> [a,b,c,d] = sscanf ('1Infinity2', '%f')

>> format compact
>> [a,b,c,d] = sscanf ('1Inf2', '%f')
a =
     1
   Inf
     2
b =
     3
c =
  0×0 empty char array
d =
     6
>> [a,b,c,d] = sscanf ('1Infinity2', '%f')
a =
     1
   Inf
b =
     2
c =
    'Matching failure in format.'
d =
     5
>>

Matlab r2018b prerelease

Philip



--
Sent from: http://octave.1599824.n4.nabble.com/Octave-Maintainers-f1638794.html