I created a plot generator function in R2019a. It takes in a table and up to 4 column names to group and plot the data. I added a functionSignatures.json file next to it which was really handy to autocomplete the possible column names. When I upgraded to R2021b the autocomplete stopped working. If I re-open R2019b (still installed side-by-side with 2021b) the exact same inputs still work as they used to, but in 2021b it just shows "No suggestions found".
I was able to re-create this behavior with the minimal example below:
functionSignatures.json
{"name":"tbl", "kind":"required", "type":"table"},
{"name":"xvar", "kind":"positional", "type":["choices=matlab.internal.tabular.functionsignatures.keyChoices(tbl)"]},
{"name":"yvar", "kind":"positional", "type":["choices=matlab.internal.tabular.functionsignatures.keyChoices(tbl)"]},
{"name":"extra1", "kind":"positional", "type":["choices=matlab.internal.tabular.functionsignatures.keyChoices(tbl)"]},
{"name":"extra2", "kind":"positional", "type":["choices=matlab.internal.tabular.functionsignatures.keyChoices(tbl)"]}
}
Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.
MyPlot.m
function MyPlot(tbl, xvar, yvar, extra1, extra2)
plot(tbl.(xvar), tbl.(yvar));
Add those two files next to each other in some folder and go to that folder in R2019b.
Create a dummy table
t = table([1:10]', rand(10,1), 'VariableNames', {'Idx','RandNum'})
and try to use MyPlot
and you will see autocomplete options
Repeat this in 2021b and you will see "No completions found"
Please advise if I need to update something for this to work in 2021b. My plotter function still works, I just wish I got to use the autocomplete I'm used to having.