Search Comments and Ratings

go

   
Date File Comment by Comment Rating
30 Jun 2013 (another) JSON Parser Parses JSON strings into structures and cell arrays. Author: Fran├žois Glineur Oscar

This worked great. (better than the original parser by Feenstra)

23 Mar 2012 GetFullPath Full path name for partial or relative path Author: Jan Simon Oscar

13 Mar 2012 JSONlab: a toolbox to encode/decode JSON files in MATLAB/Octave JSONlab is an open-source JSON/UBJSON encoder and decoder (parser) for MATLAB and Octave. Author: Qianqian Fang Oscar

I'm sorry again(!). Here is how the example should be.

works = struct('root', struct('root2', struct('root3', [1 2]')));
works_out = loadjson(savejson('' , works));

doesnt_work = struct('root', struct('root2', struct('root3', [1 2])));
doesnt_work_out = loadjson(savejson('' , doesnt_work));

13 Mar 2012 JSONlab: a toolbox to encode/decode JSON files in MATLAB/Octave JSONlab is an open-source JSON/UBJSON encoder and decoder (parser) for MATLAB and Octave. Author: Qianqian Fang Oscar

I'm sorry, my previous post didn't appear for some reason. Here is it:
works = struct('root', struct('root2', struct('root3', [1 2]')));
works_out = loadjson(savejson('' , meta2));

donesnt_work = struct('root', struct('root2', struct('root3', [1 2])));
donesnt_work_out = loadjson(savejson('' , meta2));

13 Mar 2012 JSONlab: a toolbox to encode/decode JSON files in MATLAB/Octave JSONlab is an open-source JSON/UBJSON encoder and decoder (parser) for MATLAB and Octave. Author: Qianqian Fang Oscar

also, in the case that works. The ouptut 'works_out' is not exactly the same as the input. In fact, it has turned into 'doenesnt_work'.

13 Mar 2012 JSONlab: a toolbox to encode/decode JSON files in MATLAB/Octave JSONlab is an open-source JSON/UBJSON encoder and decoder (parser) for MATLAB and Octave. Author: Qianqian Fang Oscar

hi Qianqian,

I found the problem. If the struct contains row-vectors, they don't get properly encoded. I added these simple lines to the mat2json subfunction, that convert the row-vectors to column-vectors, and now it works like a charm.

if ((size(item, 1) == 1) && size(item, 2) > 1)
item = item';
end

thanks

13 Mar 2012 JSONlab: a toolbox to encode/decode JSON files in MATLAB/Octave JSONlab is an open-source JSON/UBJSON encoder and decoder (parser) for MATLAB and Octave. Author: Qianqian Fang Oscar

In my experience, this doesn't work for all kinds of object, and remarkably, I couldn't load the output json struct with 'loadjson' that was created by 'savejson'. I wonder if there might be fundamental problems / ambiguities with a json matlab - struct interface?

18 Aug 2011 Arbitrary Square Bounded Voronoi Diagram Compute individual Voronoi cell area of 2D point sets bounded in an arbitrary square Author: Meng Sang Ong Oscar

It seems this function has some bugs in it. With input
x = 0.5000 y= 0.3333
0.5010 0.6666
5.0000 5.0000

and corners = [0 1 0 1] it gives me [4997 0 0]. This, clearly is not correct, as the two first points should have roughly half each of the specified area. Or perhaps I don't understand the interface correctly. Also, the documentation is rather sparse for this code. Thanks, though for a great effort. This is the only code I could find that attempts this.

29 Apr 2011 Subaxis - Subplot Use HTML jargon for multi axis layout. Author: Aslak Grinsted Oscar

Very useful, thanks

12 Sep 2010 sort_nat: Natural Order Sort Sort strings in natural order. Author: Douglas Schwarz Oscar

Contact us