如何仅在MATLAB中以列的形式写入数据。 [英] How to write data in columns only in MATLAB.

查看:404
本文介绍了如何仅在MATLAB中以列的形式写入数据。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在使用xlswrite();把我的变量写入excel表单它工作得很完美,但它将我的变量写入第一行,其中我在第一列中写入它,然后我有另一个变量,我想在第二列中写入它。比方说我的第一个变量是x-axisCordinates我这样做xlswrite('testdata',x-axisCordinates)它写入第一行中的所有数据,我希望它在第一列中。在写完之后我又有另一个变量调用y-axisCordinates我想把它写在同一个文件的第二列中。

非常感谢

问候

解决方案

积分(YaoLi)

xlswrite( 'testdata',x-axisCordinates'),'转换为nx1数组

你可以指定范围('C1:C5')

xlswrite(filename中,A,范围)

Hi
I am using xlswrite(); to write my variable into excel sheet it works perfect but it writes my variable in the first row where as iw ant to write it in my first column and then i have another variable i want to write it in second column. Say for example my first variab is x-axisCordinates i do this xlswrite('testdata',x-axisCordinates) it write all the data in first row where as i wanted it in to be in the first column. Secondly after writing this i have another variable call y-axisCordinates i want to write it in the second column now of the same file.?
Thanks anyways
Regards

解决方案

Credits (YaoLi)
xlswrite('testdata',x-axisCordinates') ,"'" to convert to a nx1 array
You can specify the range ('C1:C5')
xlswrite(filename,A,range)


这篇关于如何仅在MATLAB中以列的形式写入数据。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆