回 帖 发 新 帖 刷新版面

主题:求助:Matlab中的spy命令的绘图颜色问题


大家好!

g是一个稀疏矩阵,
我用spy(g,'k.');想用黑色点绘制稀疏矩阵,但是提示

When the first input is a message identifier, the second input
must be a string.


这是为什么?
请教,谢谢!

回复列表 (共1个回复)

沙发


I know it is a bug in the SPY function within MATLAB 7.0 (R14).

1. Quit MATLAB

2. Rename the following M-file:
$MATLAB\toolbox\matlab\sparfun\spy.m
(where $MATLAB is the MATLAB root directory on your machine, as returned by typing
matlabroot
at the MATLAB command prompt.)

Rename the file to spy.m.old

3. Download the following file from our Web site:

http://www.mathworks.com/support/solutions/files/s1-OKXCW/spy.m

Place the new M-file in $MATLAB\toolbox\matlab\sparfun.

4. Restart MATLAB

5. After restarting MATLAB, issue the following command at the MATLAB prompt:

rehash toolboxcache

我来回复

您尚未登录,请登录后再回复。点此登录或注册