博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
面试题之矩阵与转置矩阵相乘
阅读量:6992 次
发布时间:2019-06-27

本文共 844 字,大约阅读时间需要 2 分钟。

话不多说,直接上代码

1 /** 2  * Created with IntelliJ IDEA 3  * Created By chump 4  * Date: 2017/7/3 5  * Time: 9:27 6  */ 7 /** 8  * 输入一个初始值,矩阵行,矩阵列,根据初始值构建矩阵,求出转置矩阵,最后求出矩阵的乘积返回 9  * 如:输入1,3,3可构建矩阵10  * 1    2   311  * 4    5   612  * 7    8   913  * 转置矩阵为14  * 1    4   715  * 2    5   816  * 3    6   917  */18 public class MatrixProduct {19     public static void main(String []args){20         MatrixProduct matrixProduct = new MatrixProduct();21         matrixProduct.Matrix(1,3,3);22     }23     public int [][] Matrix(int initValue,int rows,int columns){24         int init = initValue;           //初始值25         int row = rows ;                //行26         int column = columns;           //列27         //初始化矩阵28         int [][]matrixOriginal = new int[row][column];29         for(int i=0;i

 

转载于:https://www.cnblogs.com/chump-zwl/p/7109908.html

你可能感兴趣的文章
课程作业
查看>>
CSS shapes布局
查看>>
vue中如何实现pdf文件预览?
查看>>
ios7官方推荐icon尺寸
查看>>
VUE项目的目录关系
查看>>
基于pygame实现飞机大战【面向过程】
查看>>
Android操作HTTP实现与服务器通信(转)
查看>>
5秒速记php数组排序函数
查看>>
【分享】Objective-C Runtime
查看>>
Spring_Aop_(二)
查看>>
MySQL execute dynamic sql script.
查看>>
Collection框架
查看>>
Serv U 占用80端口
查看>>
20190320-每周刷题
查看>>
迁移EXT4
查看>>
python 基础笔记十二 - 模块&第三方模块安装
查看>>
AV Foundation 学习
查看>>
WP7上HttpWebRequest的用法
查看>>
3:16: 错误: expected declaration specifiers or ‘...’ before string constant
查看>>
大白话5分钟带你走进人工智能-第二十五节决策树系列之信息增益和信息增益率(4)...
查看>>