MATLAB save函数的参数报错:Argument must contain a string
来源:互联网 发布:小智外设淘宝店 编辑:程序博客网 时间:2024/05/16 23:01
郁闷了,测试一段很简单的程序,就是上面这样的错误,代码如下:
proFileName = 'TheChVector';
pixName = '.mat';
chVector = ........%此处就省略了啊,反正要保存chVector变量
save(saveFile, chVector);% error:Argument must contain a string.
不知道这个问题是不是因为太弱了,网上居然就木有提问的……好吧,自己解决,弱就弱,反正记下来,省的忘了。
save函数把所有参数当做变量,而非“变量名”考虑,比如,变量中有个x='here', 然后你要保存x这个变量,如果只写save(filename, x)的时候,系统就会寻找名为“here”的变量,如果没有就会报错(这时你真的很幸运), 否则就会保存你不想保存的内容。此时,要想保存真正的x,就要这样写: save(filename,‘x’)
同理,对于保存的文件名也一样,如果是直接的内容就好办,但是如果是其他的变量char文件名,加‘’括起来就好了。
上述更改为:
save('saveFile', 'chVector');
- MATLAB save函数的参数报错:Argument must contain a string
- matlab的save函数的用法 Argument must contain a string.
- 学习shiro代码报错:Line argument must contain a key and a value. Only one string token was found.
- 学习shiro代码报错:Line argument must contain a key and a value. Only one string token was found.
- The diagram must contain a powergui block. The block must be named <powergui> matlab simulink 报错
- Snort 报错 Each rule must contain a rule sid
- iOS之报错The app's Info.plist must contain an xxx key with a string value explaining
- Shiro异常 : IllegalArgumentException: Line argument must contain a key and a value. Only one
- Shiro异常:java.lang.IllegalArgumentException: Line argument must contain a key and a value. Only one
- Invalid file name: must contain only [a-z0-9_.]【Android报错】
- 学习node时报错throw new TypeError('first argument must be a string or Buffer');
- Shiro异常1:java.lang.IllegalArgumentException: Line argument must contain a key and a value. Only one
- android报错res\drawable-xhdpi\ic_Dianhua.png: Invalid file name: must contain only [a-z0-9_.]
- React 使用fromidable 模块进行文件上传出现First argument must be a string 的解析错误的原因
- hibernate save数据的时候报错:ids for this class must be manually assigned before calling save()
- hibernate save数据的时候报错:ids for this class must be manually assigned before calling save()
- int() argument must be a string or a number, not 'SimpleLazyObject'
- gpstop failed. (Reason='int() argument must be a string or a number, not 'NoneType'') exiting...
- jquery uploadify 3.2 基于struts2 上传文件
- Ubuntu安装和卸载MYSQL
- 使用CSS制作简单的下拉菜单导航,用的是hover,js下次在分享
- momentarily deactivate your anti-virus software
- H.245:相关术语定义(中英双译)
- MATLAB save函数的参数报错:Argument must contain a string
- linux查看文件创建时间
- BigTable笔记
- Codeforces 362B Petya and Staircases
- IOS在后台每隔一段时间执行一下
- 关于Struts2的类型转换详解
- Ogre窗口嵌入QWidget
- OSPF:MTU不一致导致的邻接关系问题
- 字符串常见问题总结(二)