Da Vinci Firmware 1
Firmware for the DaVinci-M rocket avionics board.
Loading...
Searching...
No Matches
mtimes.c
Go to the documentation of this file.
1/*
2 * Academic License - for use in teaching, academic research, and meeting
3 * course requirements at degree granting institutions only. Not for
4 * government, commercial, or other organizational use.
5 * File: mtimes.c
6 *
7 * MATLAB Coder version : 24.2
8 * C/C++ source code generated on : 03-Dec-2024 17:11:12
9 */
10
11/* Include Files */
12#include "mtimes.h"
13#include "rt_nonfinite.h"
14
15/* Function Definitions */
16/*
17 * Arguments : const double A_data[]
18 * const int A_size[2]
19 * const double B_data[]
20 * double C_data[]
21 * Return Type : int
22 */
23int mtimes(const double A_data[], const int A_size[2], const double B_data[],
24 double C_data[])
25{
26 int C_size;
27 int b_i;
28 int i;
29 int k;
30 C_size = A_size[0];
31 i = A_size[1];
32 if (A_size[0] - 1 >= 0) {
33 C_data[0] = 0.0;
34 }
35 for (k = 0; k < i; k++) {
36 for (b_i = 0; b_i < C_size; b_i++) {
37 C_data[0] += A_data[0] * B_data[0];
38 }
39 }
40 return C_size;
41}
42
43/*
44 * File trailer for mtimes.c
45 *
46 * [EOF]
47 */
int mtimes(const double A_data[], const int A_size[2], const double B_data[], double C_data[])
Performs matrix multiplication: C = A * B.
Definition mtimes.c:23
A MATLAB Coder helper function for matrix multiplication.
Provides definitions and utility functions for non-finite floating-point values.