Matlab 文件格式化/Matlab Source File Formattor
由于需要使用到别人编写的Matlab代码文件,但是呢不同的人有不同的风格,有的写得就比较糟糕了。
为了更好地理解代码的内容,一个比较美观的代码会让人身心愉悦。
但是在网上并没有找到一个比较好的实现,此前到是找到一个使用Matlab的M文件来实现代码格式化的,设置还挺多的,但是我就是不喜欢(I'm Geek)。
因此,用C++和正则写了一个简单的代码格式化小工具,MFormator。已经开源到Github上了。
欢迎指教。
I do quite a lot of works with Matlab. And chances are that, I shall read some others' code. It's a pity that not all the guys write code in a neat way. At the same time, it's easier for comprehension if the code is neatly presented. So it's of great importance to format the code.
I've searched through the Internet, but is disappointed by the fact that there aren't many tools to achieve this goal. The only one I found is written in M-file. I'm a geek, and also a vim user.
So I wrote a little command line tool named MFormator
which is written in C++ with regex expression. And you can find it on the github.
Please tell me if this tool help you Troy_Daniel@163.com.
Matlab 文件格式化/Matlab Source File Formattor的更多相关文章
- Matlab 文件格式化/Matlab Source File Formator
由于需要使用到别人编写的Matlab代码文件,但是呢不同的人有不同的风格,有的写得就比较糟糕了. 为了更好地理解代码的内容,一个比较美观的代码会让人身心愉悦. 但是在网上并没有找到一个比较好的实现,此 ...
- (转)Eclipse - CDT使用GDB调试C++的问题-无源文件命名(No source file named)
http://tech.ddvip.com/2014-09/1411618782213496.html Eclipse CDT调试C++, 使用的Unix的调试器GDB; 由于在Unix下, 文件的目 ...
- Matlab文件和数据的导入与导出
ref: https://blog.csdn.net/zengzeyu/article/details/72530596 Matlab文件和数据的导入与导出 2017年05月19日 15:18:35 ...
- matlab文件操作及读txt文件(fopen,fseek,fread,fclose)
文件操作是一种重要的输入输出方式,即从数据文件读取数据或将结果写入数据文件.MATLAB提供了一系列低层输入输出函数,专门用于文件操作. 1.文件的打开与关闭 1)打开文件 在读写文件之前,必须先用f ...
- matlab数据的导入和导出,以matlab工作区workspace为source和destination
MATLAB支持工作区的保存.用户可以将工作区或工作区中的变量以文件的形式保存,以备在需要时再次导入. 保存工作区可以通过菜单进行,也可以通过命令窗口进行. 数据导出 1. 保存整个工作区 选择Fil ...
- MATLAB文件操作及读txt文件
转自:http://blog.csdn.net/vblittleboy/article/details/8049748 文件操作是一种重要的输入输出方式,即从数据文件读取数据或将结果写入数据文件.MA ...
- Matlab文件操作
1. Matlab文件操作主要有三个步骤:首先打开文件,然后对文件进行读写操作,最后要关闭文件. 2. fid=fopen(文件名,打开方式) 'r' 只读,文件必须存在(缺省的打开方式) 'w' ...
- Matlab 文件命名规则
Matlab 文件命名规则 1.文件名命名要用英文字符,第一个字符不能是数字和下划线. 2.文件名不要取为matlab的一个固有函数,m文件名的命名尽量不要是简单的英文单词,最好是由大小写英文.数字. ...
- 生成用于ROM初始化的coe文件---使用matlab
生成用于ROM初始化的coe文件---使用matlab t=0:2*pi/2^12:2*pi; y=0.5*sin(t)+0.5; r=ceil(y*(2^8-1)); fid = fopen('si ...
随机推荐
- java课堂动手测试2
测试一 编写一个方法,使用以上算法生成指定数目(比如1000个)的随机整数. 程序源代码 import java.util.Random;import java.util.Scanner; publi ...
- R语言-八皇后问题
老师给我出了个暑期作业:用R语言解决八皇后问题. 八皇后问题:国际象棋棋盘(8×8)上放8个“后”,使8个“后”之间互相不能被进攻.(即:每个“后”所在行.列.两条斜线都没有其它子) 查看网上,大多用 ...
- 【leetcode】1224. Maximum Equal Frequency
题目如下: Given an array nums of positive integers, return the longest possible length of an array prefi ...
- 对 Promises/A+ 规范的研究 ------引用
作为 Modern JavaScript 基础设施的一部分,Promises 对前端开发者而言异常重要.它是 async/await 语法的基础,是 JavaScript 中处理异步的标准形式.并且, ...
- jetcache:在Spring Boot中怎么玩?
- vertical-greenplum
https://github.com/sumitchawla/docker-vertica You can either pull the image from Docker Registry usi ...
- Python爬虫十六式 - 第三式:Requests的用法
Requests: 让 HTTP 服务人类 学习一时爽,一直学习一直爽 Hello,大家好,我是Connor,一个从无到有的技术小白.今天我们继续来说我们的 Python 爬虫,上一次我们说到了 ...
- BigDecimal除法问题
BigDecimal类的主要功能是进行小数的大数计算,而且最重要的是可以精确到指定的四舍五入位数. 如果要进行四舍五入的操作,则必须依靠以下的方法:public BigDecimal divide(B ...
- 关于Struts2_2.3.24中FilterDispatcher过期的问题
今天在使用最新版Struts2.3.24时,总是报出如下警告: ******************************************************************** ...
- 使用注解装配Bean
注解@Component代表Spring Ioc 会把 这个类扫描生产Bean 实例,而其中 value属性代表这个类在Spring 中的id,这就相当于XML方式定义的Bean 的 id 现在有了 ...