Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

corelib.parseNameValueArguments doesn't work on new versions of matlab #110

Open
alec-hoyland opened this issue Aug 1, 2021 · 1 comment
Assignees
Labels

Comments

@alec-hoyland
Copy link
Contributor

On new versions of matlab, passing varargin as an argument to a function instantiates a "new instance" of varargin...for example

myfunc(varargin)

would create an n x 1 cell array variable named varargin in the local scope of the function, but calling corelib.parseNameValueArguments would create a 1x1 cell array that itself contains the n x 1 varargin cell array. This breaks the function because corelib.parseNameValueArguments throws an error if you provide it one input and it's not a struct. The simple fix is to just rename the variable in the function signature so that matlab doesn't interpret it as another instance of varargin specific to corelib.parseNameValueArguments.

@sg-s
Copy link
Owner

sg-s commented Nov 3, 2021

this should be removed, since namedargs2cell does the job. remove from:

  • +axlib/label.m:
  • +axlib/makeEphys.m:
  • +axlib/separate.m:
  • +clusterlib/densityPeaks.m:
  • +corelib/parseNameValueArguments.m:
  • +figlib/label.m:
  • +figlib/pretty.m:
  • +figlib/saveall.m:
  • +figlib/shrink.m:
  • +imglib/triangle.m:
  • +neurolib/raster.m:
  • +neurolib/spiketrain.m:
  • +neurolib/staggerSpikes.m:
  • +plotlib/cplot.m:
  • +plotlib/pairwise.m:
  • +plotlib/pieceWiseLinear.m:
  • +plotlib/raincloud.m:
  • +plotlib/scatterhist.m:
  • +plotlib/trajectory.m:
  • +veclib/closeReturn.m:
  • deprecated/abf2kontroller.m:
  • deprecated/animatePhasePlot.m:

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants