matlab图形绘制豆瓣,4. Matlab函数产生的Figure图形框怎么嵌入C# Winform中的一个Panel中...

4. Matlab函数产生的Figure图形框如何嵌入C# Winform中的一个Panel中?

求解答啊,困扰好久了~来高手~~~~

winform

matlab

图形

c#

分享到:

更多

------解决方案--------------------

Matlab  调用 .net  ,很简单, 比如, 在matllab 中 调用.Net 的 WinForms

NET.addAssembly('System.Windows.Forms')

ff = System.Windows.Forms.Form() ;

...

Matlab,和其它语言,互操,已经很方便了

.Net 调用Matlab ,有很多途径

比如,你的要求, 可以用 Matlab Builder NE

而 plot 绘图, 直接有

matlabroot\toolbox\dotnetbuilder\Examples\VS8\NET\PlotExample

文件夹内, example:

PlotApp.cs

PlotCSApp.csproj

AssemblyInfo.cs

上面是C#, 还有Cpp,VB等版本

------解决方案--------------------

C# 调用 matlab的范例

using System;

using MathWorks.MATLAB.NET.Utility;

using MathWorks.MATLAB.NET.Arrays;

using PlotComp;

....

{

const int numPoints= 10;  // Number of points to plot

// Allocate native array for plot values

double [,] plotValues= new double[2, numPoints];

// Plot 5x vs x^2

for (int x= 1; x <= numPoints; x++)

{

plotValues[0, x-1]= x*5;

plotValues[1, x-1]= x*x;

}

// Create a new plotter object

Plotter plotter= new Plotter();

// Plot the two sets of values - Note the ability to cast the native array to a MATLAB numeric array

plotter.drawgraph((MWNumericArray)plotValues);

------解决方案--------------------

引用:引用:引用:Matlab  调用 .net  ,很简单, 比如, 在matllab 中 调用.Net 的 WinForms

NET.addAssembly('System.Windows.Forms')

ff = System.Windows.Forms.Form() ;

..……

这个我也想 看看

------解决方案--------------------

引用:引用:引用:Matlab  调用 .net  ,很简单, 比如, 在matllab 中 调用.Net 的 WinForms

NET.addAssembly('System.Windows.Forms')

ff = System.Windows.Forms.Form() ;

..……

请问你这种方法是在matlab中把图片存储,c#去读取这种方式吗?如果不是的话请给我发一个实例,谢谢,191330159@qq.com

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值