zoukankan      html  css  js  c++  java
  • NX二次开发UFUN输入两个3x3矩阵获得乘积UF_MTX3_multiply

    NX11+VS2013
    
    #include <uf.h>
    #include <uf_ui.h>
    #include <uf_mtx.h>
    
    
    UF_initialize();
    
    //输入两个3x3矩阵获得乘积
    
    double mtx1[9] = { 1.0, 0.0, 0.0,
                        0.0, 1.0, 0.0,
                        0.0, 0.0, 1.0 };
    
    double mtx2[9] = { 0.0, 0.0, 1.0,
                        0.0, 1.0, 0.0,
                            1.0, 0.0, 0.0 };
    
    double mtx_product[9] = { 0 }; //矩阵乘积mtx_product = mtx1 X mtx2
    UF_MTX3_multiply(mtx1, mtx2, mtx_product);
    
    //转换打印
    char msg[256];
    sprintf(msg, "%f,%f,%f\n%f,%f,%f\n%f,%f,%f\n", mtx_product[0], mtx_product[1], mtx_product[2],
        mtx_product[3], mtx_product[4], mtx_product[5],
        mtx_product[6], mtx_product[7], mtx_product[8]);
    UF_UI_open_listing_window();
    UF_UI_write_listing_window(msg);
    
    UF_terminate();
    
    阿飞
    2021年10月28日

     

    阿飞
    2021年10月28日
  • 相关阅读:
    将数据绑定通过图表显现
    d3.js初识
    Josn
    d3-tip.js
    Java知识点总结
    Javascript的学习
    Java的多线程学习
    day11
    day10
    day09
  • 原文地址:https://www.cnblogs.com/nxopen2018/p/15474978.html
Copyright © 2011-2022 走看看