Skip to content

Add MATLAB dictionary #4505

@pwintz

Description

@pwintz

It would be nice to include a dictionary for MATLAB.
Here is a file that lists all MATLAB functions and classes from my system that could be used:
matlab.txt
It has some entries, such as which, that are redundant.

This list is generated using the following script, based on this StackOverflow answer:

% Generate a list of all directories searched by MATLAB:
pathlist = strsplit(path,pathsep);
% Get functions and classes on search path
functions = {};
classes = {};
for p = pathlist
   w = what(p{1});
   functions = [functions; ...
                erase(w.m,'.m'); ...           % M-files
                erase(w.mex,['.',mexext]); ... % MEX-files
                erase(w.p,'.p')];              % and P-files are all functions
   classes = [classes; w.classes];             % here are all classes 
   % TODO: w.packages gives package directory names, examine those too!
end
% Remove duplicates
functions = unique(functions);
classes = unique(classes);

file_id = fopen('C:\Users\pwintz\AppData\Roaming\Code\User\cspell-dictionaries\matlab.txt', 'w');
fprintf(file_id, '%s\n', functions{:}, classes{:});
% classes

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions