matlab-IntelliJ-plugin

Matlab support for IntelliJ IDEs
授权协议 MIT License
开发语言
所属分类 应用工具、 科研计算工具
软件类型 开源软件
地区 不详
投 递 者 牧飞鹏
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

Multi-OS Build

Matlab support for IntelliJ

Matlab syntax highlighting plugin for JetBrains IDEs.

https://plugins.jetbrains.com/plugin/10941-matlab-support

Installation

  1. Open Settings | Plugins (Windows) or Preferences | Plugins (MacOS)
  2. Click Browse repositories...
  3. Type Matlab Support in search bar
  4. Click Install

Running matlab files from IDE

  1. Right click on .m file in files tree.

  2. Choose Run 'helloWorld.m'.

  3. If you do it for the first time you'll see an error message telling you that interpreter is not specified.

    1. To fix it open Run | Edit configuration... choose created configuration and specify path to matlab executable.
      Tip: you can specify path to any other program that runs .m files like Octave.
  4. You can save generated run configuration so it will not be removed.To do it open Run | Edit configuration... choose the configuration and click Save icon.

Note: currently Program arguments field in configuration is ignored.

Development

For easier development install Grammar-Kit plugin.

Follow these steps to start working on the plugin:

  1. Clone project and import it to IntelliJ IDEA as Gradle project.
  2. Run/Debug runIde Gradle task.

How to re-generate parser

After you made changes to bnf or flex files you need to generate new lexer/parser code:

  1. Generate Matlab lexers. Open MatlabLexer.flex and click Run JFlex Generator from context menu, do the same for SingleQuoteStringLexer.flex.
  2. Generate Matlab parser. Open Matlab.bnf and run Generate Parser Code from context menu.

If you have any issue with setting up development environment then please create an issue.

The project is written in Kotlin. It's pretty easy to learn. To get started you may quickly look through Basic Syntax and Classes and Inheritance.
Contributions in Java are also welcomed.

To build a jar with Matlab Plugin run buildPlugin Gradle task.

Tips for plugin developers

  1. View PSI Structure.When you start IDEA with runIde Gradle task you may open a matlab file in the IDE and run View PSI Structure of Current File.. action.
  • package com.github.kornilova203.matlab.lexer; import com.intellij.lexer.FlexAdapter; import com.intellij.lexer.FlexLexer; import com.intellij.psi.tree.IElementType; import java.util.Stack; import stat

  • load x.txt %把原始数据存放在纯文本文件x.txt中,其中把数据的"替换替换成. for i=1:40 x(i,:)=x(i,:)/x(i,1); %标准化数据 end data=x; n=size(data,2); %求矩阵的列数,即观测时刻的个数 ck=data(1,:); %提出参考数列 bj=data(2:end,:); %提出比较数列 m2=size(bj,1); %求比较数列

 相关资料
  • MATLAB是矩阵实验室(Matrix Laboratory)的简称,是美国MathWorks公司出品的商业数学软件,用于算法开发、数据可视化、数据 分析以及数值计算的高级技术计算语言和交互式环境,主要包括MATLAB和Simulink两大部分。 MATLAB和Mathematica、Maple并 称为三大数学软件。它在数学类科技应用软件中在数值计算方面首屈一指。MATLAB可以进行矩阵运算、绘

  • MATLAB code for reading and writing CIFTI files, v2 This library is compatible with the CIFTI-2 format, withoutexternally installed dependencies (except that CIFTI-1 files requirewb_command for conver

  • Zaf-Matlab Zafar's Audio Functions in Matlab for audio signal analysis. Files: zaf.m: Matlab class with the audio functions. examples.ipynb: Jupyter notebook with some examples. audio_file.wav: audio

  • BIDS for MATLAB / Octave This repository aims at centralising MATLAB/Octave tools to interact with datasets conforming to the BIDS (Brain Imaging Data Structure) format. For more information about BID

  • REPET-Matlab REPeating Pattern Extraction Technique (REPET) in Matlab for audio source separation. Repetition is a fundamental element in generating and perceiving structure. In audio, mixtures are of

  • snopt-matlab (version 3.0) This is version 3.0 of the Matlab interface for sparse nonlinear optimization software SNOPT. Requires the SNOPT software package. Changes from version 2.5: all-in-one calls