We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 36b286e commit 6cbc53aCopy full SHA for 6cbc53a
1 file changed
plotly/plotly_aux/m2json.m
@@ -20,6 +20,8 @@
20
if length(val)>1
21
valstr = ['[' valstr ']'];
22
end
23
+ valstr = strrep(valstr, 'Inf', 'null');
24
+ valstr = strrep(valstr, 'NaN', 'null');
25
elseif ischar(val)
26
valstr = ['"' val '"'];
27
elseif islogical(val)
@@ -28,10 +30,6 @@
28
30
else
29
31
valstr = 'false';
32
- elseif isinf(val)
- valstr = 'null'
33
- elseif isnan(val)
34
35
36
valstr = ''; % wtf is it?
37
0 commit comments