fwrite( ) displays a character incorrectly

The character in question is ” (right double quote mark, HTML code 8221). fwrite() output is shown below:
>>fwrite(1, ' hello ” ') hello ÿ
I am using R2016b.

Answers (1)

Robert U
Robert U on 27 Jul 2017
Edited: Robert U on 27 Jul 2017
Hi usr5,
the issue addressed is the precision parameter (https://de.mathworks.com/help/matlab/ref/fwrite.html).
fwrite(1, ' hello ” ','char')
That can give you the correct output.
Kind regards,
Robert Uhlig

Categories

Find more on Elementary Math in Help Center and File Exchange

Tags

Asked:

on 27 Jul 2017

Edited:

on 27 Jul 2017

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!