matlab2c使用c++实现matlab函数系列教程-log10函数
来源:互联网 发布:最短路径算法floyd实例 编辑:程序博客网 时间:2024/04/30 10:10
全栈工程师开发手册 (作者:栾鹏)
matlab2c动态链接库下载
matlab库函数大全
matlab2c基础教程
matlab2c开发全解教程
matlab2c调用方法:
1、下载动态链接库
2、将Matlab2c.dll拷贝到exe同目录下
3、将Matlab2c.h、Matlab2c.lib放到项目头文件目录下
4、在cpp文件中引入下面的代码
#include "Matlab2c.h"#pragma comment(lib,"Matlab2c.lib") using namespace Matlab2c;
matlab中log10函数简介
1、log10函数:
矩阵元素求log(10)
2、用法说明
B =log10(A)返回矩阵元素求log(10)
log10的c++源码实现
求矩阵常数对数
输入:矩阵a,矩阵元素大于0
输出:矩阵a的以10为底的对数值
Matrix Matlab2c::log10(Matrix& a){ int i,j; Matrix p(a.row,a.column); for (i=0;i<p.row;i++) for (j=0;j<p.column;j++) p(i,j) = std::log10(a(i,j)); return p;}
log10函数的使用测试
#include "Matlab2c.h"#pragma comment(lib,"Matlab2c.lib") using namespace Matlab2c;int main(){ double a[]={1.1,2.1,3.0,4.9,5.9,6.00}; Matrix aa=Matrix(2,3,a); Matrix cc=Matlab2c::log10(aa); cout<<cc.toString()<<endl; system("pause"); return 0;}
阅读全文
2 0
- matlab2c使用c++实现matlab函数系列教程-log10函数
- matlab2c使用c++实现matlab函数系列教程-blkdiag函数
- matlab2c使用c++实现matlab函数系列教程-compan函数
- matlab2c使用c++实现matlab函数系列教程-eye函数
- matlab2c使用c++实现matlab函数系列教程-hankel函数
- matlab2c使用c++实现matlab函数系列教程-hilb函数
- matlab2c使用c++实现matlab函数系列教程-ones函数
- matlab2c使用c++实现matlab函数系列教程-zeros函数
- matlab2c使用c++实现matlab函数系列教程-pascal函数
- matlab2c使用c++实现matlab函数系列教程-toeplitz函数
- matlab2c使用c++实现matlab函数系列教程-wilkinson函数
- matlab2c使用c++实现matlab函数系列教程-diag函数
- matlab2c使用c++实现matlab函数系列教程-tril函数
- matlab2c使用c++实现matlab函数系列教程-triu函数
- matlab2c使用c++实现matlab函数系列教程-fliplr函数
- matlab2c使用c++实现matlab函数系列教程-flipud函数
- matlab2c使用c++实现matlab函数系列教程-reshape函数
- matlab2c使用c++实现matlab函数系列教程-rot90函数
- idea创建springboot项目图文教程(配置文件)(五)
- matlab2c使用c++实现matlab函数系列教程-fix函数
- matlab2c使用c++实现matlab函数系列教程-floor函数
- matlab2c使用c++实现matlab函数系列教程-log函数
- mybatis下面的xml不能出现自动提示功能
- matlab2c使用c++实现matlab函数系列教程-log10函数
- matlab2c使用c++实现matlab函数系列教程-tan函数
- matlab2c使用c++实现matlab函数系列教程-cosh函数
- matlab2c使用c++实现matlab函数系列教程-sinh函数
- matlab2c使用c++实现matlab函数系列教程-asin函数
- matlab2c使用c++实现matlab函数系列教程-sin函数
- Unity UGUI点击、拖动等事件
- matlab2c使用c++实现matlab函数系列教程-cos函数
- 《DevOps 实践》