- 积分
- 15
- 注册时间
- 2008-7-20
- 仿真币
-
- 最后登录
- 1970-1-1
|
发表于 2009-12-18 17:11:11
|
显示全部楼层
来自 黑龙江哈尔滨
由于在maple里画的图不是很好看,我想把图的数据导出来在origin里画,哪位大侠帮下忙,在maple里怎么把图形的数据导出来,最好导成excel的形式,谢谢了
capricorn 发表于 2009-12-18 16:02
我记得我是仿照wikipedia的一个程序(即:下面的3D图形的导出程序)写的,虽然简陋,但能用。
-
- restart;
- PlotCommand := plot(sin(x),x=0..2, numpoints =60);
-
- #save(PlotCommand,"c:\\PlotCommand.txt");
- Points :=op(1,op(indets(PlotCommand,function))[2]);
- whattype(Points);
- NumPoints :=nops(Points);
- PointsOutTemp:=Matrix(NumPoints,2,[]);
- whattype(PointsOutTemp);
- PointsOut :=Matrix(NumPoints,2,Points);
- whattype(PointsOut);
- ExportMatrix("c:\\PointsOut.xls",PointsOut);
-
- #-------------------------------------------------- 3D
- > P := plot3d(sin(x*y),x=-2..2,y=-2..2):
- > Q:= < op(indets(P,Array))>;
- [ 25 x 25 Matrix ]
- Q := [ Data Type: float[8] ]
- [ Storage: rectangular ]
- [ Order: C_order ]
- You can then export this data to a file and insert in a spreadsheet.
- 1. Export to a tab delimited file:
- Right-click on the output and choose:
- Export As -> Tab Deliminated
- save it to a tab-delimited format file with extension .xls. Click on the file (if the extension is associated) or import as tab delimited. Your data will then be in the spreadsheet.
- 2. The same result by a command:
- > ExportMatrix("plot.xls",Q);
- 3. Only in Standard GUI (Maple 11 or later), export to .xls format:
- > with(ExcelTools);
- > Export(Q, "plot.xls");
复制代码 |
|