Matlab bases

运行matlab程序可以在command window中,也可以在m文件中,m文件中好更改 好保存 还是m文件中运行程序更方便些
  • cd – 查看当前工作目录
  • which + 文件名 – 查看特定文件所在目录(此处,该文件所在目录一定要能被matlab找到,这些目录可以手动加入matlab路径中,与windows系统的path类似:file->set path -> add with subfolders 选择要添加的文件夹保存即可
  • 运行m文件 – 输入.m之前的文件名 + 该m文件所需参数
  • 快速集成M文件到C++工程 – Matlab   Add-in的安装:
1.   启动Matlab,运行“mex-setup”,按照菜单提示选取MSVC。它将配置MEX使用MSVC为默认的编译器(创建C-MEX文件必需),并安装Matlab Add-in所需文件到MSVC目录。   
2.   在Matlab环境下运行“mbuild-setup”,按提示选取MSVC。它将配置使用MSVC为默认的编译器(创建独立应用程序必需),并安装Matlab Add-in所需的Matlab Compiler和C/C++数学库文件到MSVC目录。   
3.   在Matlab环境下运行“cd(prefdir)”和“mccsavepath”。它将保存当前Matlab路径到mccpath文件中,这是因为Matlab Add-in脱离Matlab运行,否则它无从知道Matlab路径。   
4.   在MSVC环境中配置Matlab Add-in,方法是:从菜单“Tools-> Customize”选择“Add-ins and Macro Files”选项卡,选中“Matlab Add-in”,点击“Close”。MSVC工具栏出现Matlab Add-in图标,以后每次启动VC,自动加载Matlab Add-in。   
5.   配置Windows系统。在Windows 95/98系统下,找到config.sys, 添加一行:shell= c:\command.com  /e:32768/p(Windows ME有所不同,需设置Conagent.exe的属性Memory选项卡的Initial Environment值为4096)。从表面看,VC的环境设置也是步骤较多,但只需设置一次。
  • wget命令是一个从网络上自动下载文件的自由工具。它支持HTTP,HTTPS和FTP协议,可以使用HTTP代理. 所谓的自动下载是指,wget可以在用户退出系统的之后在后台执行。wget可以跟踪HTML页面上的链接依次下载来创建远程服务器的本地版本,完全重建原始站点的目录结构。这又常被称作”递归下载”。在递归下载的时候,wget遵循Robot Exclusion标准(/robots.txt). wget可以在下载的同时,将链接转换成指向本地文件,以方便离线浏览。wget非常稳定,它在带宽很窄的情况下和不稳定网络中有很强的适应性.如果是由于网络的原因下载失败,wget会不断的尝试,直到整个文件下载完 毕。如果是服务器打断下载过程,它会再次联到服务器上从停止的地方继续下载。这对从那些限定了链接时间的服务器上下载大文件非常有用。 wget的常见用法 – wget的使用格式:  wget [OPTION]… [URL]…用wget做站点镜像:

wget -r -p -np -k http://dsec.pku.edu.cn/~usr_name/
# 或者
wget -m http://www.tldp.org/LDP/abs/html/在不稳定的网络上下载一个部分下载的文件,以及在空闲时段下载
wget -t 0 -w 31 -c http://dsec.pku.edu.cn/BBC.avi -o down.log &
# 或者从filelist读入要下载的文件列表
wget -t 0 -w 31 -c -B ftp://dsec.pku.edu.cn/linuxsoft -i filelist.txt -o down.log &

more wget from this

    • Compile Error:Could not detect a compiler on local system which can compile the specified input file(s) 
>> mex -setup

Welcome to mex -setup. This utility will help you set up
a default compiler. For a list of supported compilers, see
http://www.mathworks.com/support/compilers/R2011a/win64.html

Please choose your compiler for building MEX-files:

Would you like mex to locate installed compilers [y]/n? y

Select a compiler:
[1] Microsoft Visual C++ 2010 in d:\Program Files (x86)\Microsoft Visual Studio 10.0

[0] None

Compiler: 1

Please verify your choices:

Compiler: Microsoft Visual C++ 2010
Location: d:\Program Files (x86)\Microsoft Visual Studio 10.0

Are these correct [y]/n? y

***************************************************************************
Warning: MEX-files generated using Microsoft Visual C++ 2010 require
that Microsoft Visual Studio 2010 run-time libraries be
available on the computer they are run on.
If you plan to redistribute your MEX-files to other MATLAB
users, be sure that they have the run-time libraries.
***************************************************************************

Trying to update options file: C:\Users\Ava\AppData\Roaming\MathWorks\MATLAB\R2011a\mexopts.bat
From template: D:\PROGRA~2\MATLAB\R2011a\bin\win64\mexopts\msvc100opts.bat

Done . . .

**************************************************************************
Warning: The MATLAB C and Fortran API has changed to support MATLAB
variables with more than 2^32-1 elements. In the near future
you will be required to update your code to utilize the new
API. You can find more information about this at:
http://www.mathworks.com/support/solutions/en/data/1-5C27B9/?solution=1-5C27B9
Building with the -largeArrayDims option enables the new API.
**************************************************************************
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

生活在西班牙

自己动手丰衣足食

BlueAsteroid

Just another WordPress.com site

Jing's Blog

Just another WordPress.com site

Start from here......

我的心情魔方

天才遠私廚

希望能做一個分享各種資訊的好地方

语义噪声

西瓜大丸子汤的博客

笑对人生,傲立寰宇

Just another WordPress.com site

Where On Earth Is Waldo?

A Project By Melanie Coles

the Serious Computer Vision Blog

A blog about computer vision and serious stuff

Cauthy's Blog

paper review...

Cornell Computer Vision Seminar Blog

Blog for CS 7670 - Special Topics in Computer Vision

datarazzi

Life through nerd-colored glasses

Luciana Haill

Brainwaves Augmenting Consciousness

槑烎

1,2,∞

Dr Paul Tennent

and the university of nottingham

turn off the lights, please

A bunch of random, thinned and stateless thoughts around the Web

%d bloggers like this: