File Exchange

image thumbnail

Insert a piece of code (a snippet) in the Matlab editor

version 1.4.0.0 (1.58 KB) by Vincent Mazet
Paste into the editor a code using the shortcuts toolbar.

3 Downloads

Updated 12 Nov 2014

View Version History

View License

You often use the same code, but you still don't remember it?
1. Copy the code of the file insert_snippet.m.

2. Create a new shortcut in Matlab.

3. Paste the code into 'Callback'.

4. Change the code in the 22th line.

5. Give a name to your shortcut in 'Label'.

6. Click 'Save'.

7. Click on the newly created shortcut to paste your code into the editor.

Cite As

Vincent Mazet (2021). Insert a piece of code (a snippet) in the Matlab editor (https://www.mathworks.com/matlabcentral/fileexchange/41704-insert-a-piece-of-code-a-snippet-in-the-matlab-editor), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (6)

L Amy

micholeodon

lian xiang

Kaining Cheung

Shay Ben-Sasson

Great.
I created a Snippets dir, and changed your code so I could pass the name of the snippet file name to the function from the command window and it will paste the snippet in the right place. thanx

http://bit.ly/insert_snippet_matlab

Nicolas

MATLAB Release Compatibility
Created with R2010a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Acknowledgements

Inspired: RobustCodeExpo2016, MATLAB Snippets

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!