matlab2c使用c++实现matlab函数系列教程-flipud函数
来源:互联网 发布:换手机登陆淘宝账号 编辑:程序博客网 时间:2024/04/29 20:58
全栈工程师开发手册 (作者:栾鹏)
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中flipud函数简介
1、flipud函数:上下翻转矩阵
2、用法说明
B = flipud(A) 矩阵A上下翻转获得B,若A为列向量,则B为倒叙A,若A为行向量,则B等于A
flipud的c++源码实现
矩阵上下翻转
矩阵上下翻转:输入为一个矩阵,输出为该矩阵上下翻转后的矩阵,若A为列向量,则B为倒叙A,若A为行向量,则B等于A
Matrix Matlab2c::flipud(Matrix& a){ Matrix p(a.row,a.column); double temp; for (int i=0;i<(p.row-1)/2+1;i++) { for (int j=0;j<p.column;j++) { temp = a(i,j); p(i,j) = a(a.row-1-i,j); p(p.row-1-i,j) = temp; } } return p;}CMatrix Matlab2c::flipud(CMatrix& a){ CMatrix p(a.row,a.column); Complex temp; for (int i=0;i<(p.row-1)/2+1;i++) { for (int j=0;j<p.column;j++) { temp = a(i,j); p(i,j) = a(a.row-1-i,j); p(p.row-1-i,j) = temp; } } return p;}
flipud函数的使用测试
#include "Matlab2c.h"#pragma comment(lib,"Matlab2c.lib") using namespace Matlab2c;int main(){ double a[]={1,2,3,4,5,6}; Matrix aa=Matrix(2,3,a); Matrix cc=Matlab2c::flipud(aa); cout<<cc.toString()<<endl; system("pause"); return 0;}
阅读全文
1 0
- matlab2c使用c++实现matlab函数系列教程-flipud函数
- 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函数系列教程-reshape函数
- matlab2c使用c++实现matlab函数系列教程-rot90函数
- matlab2c使用c++实现matlab函数系列教程-repmat函数
- 网上资源汇总深度学习和机器学习实战例子
- POJ 2777 Count Color(线段树)
- 面试题3
- 基于Linux系统的TCP协议的即时通信系统
- AIM Tech Round 4 (Div. 2) C
- matlab2c使用c++实现matlab函数系列教程-flipud函数
- 安卓开发艺术探索笔记第一章
- 区块链3.0(二):超越货币、经济和市场的效率和协作应用
- Neo4J CQL -(19)- 字符串函数
- JQuery自定义命名空间
- hdoj 2588 GCD
- React-Native学习总结
- Android攻城狮的第二门课(第1季)第8章 Fragment基础概述
- 区块链2.0(二):区块链在金融服务领域的运用案例