当前位置:网站首页>[Matlab] Simulink 自定义函数中的矩阵乘法工作不正常时可以使用模块库中的矩阵乘法模块代替
[Matlab] Simulink 自定义函数中的矩阵乘法工作不正常时可以使用模块库中的矩阵乘法模块代替
2022-07-07 04:38:00 【廉价喵】
一般来说,自定义函数中的矩阵乘法都会是正常的……

Test1
function y = fcn(u)
A = rand(4,3);
y = A*u;
但是我朋友在写的时候就确确实实出现了这个问题,如下图,输入的是一个 31 的矩阵,在自定义函数里面与一个 43 的矩阵相乘,得到还是一个 4*3 的矩阵


后面实在不行,把自定义函数由接受 x 计算 Ax 变成输出 A,使用矩阵乘法的模块计算 Ax,才使得工作正常

不知道这是什么神奇操作可能还是跟他其他模块有关系,但是这就很复杂了
边栏推荐
猜你喜欢

3D reconstruction - stereo correction

科技云报道:从Robot到Cobot,人机共融正在开创一个时代

IO stream file
![[SUCTF 2019]Game](/img/9c/362117a4bf3a1435ececa288112dfc.png)
[SUCTF 2019]Game

Sign up now | oar hacker marathon phase III, waiting for your challenge
![[CV] Wu Enda machine learning course notes | Chapter 8](/img/c0/7a39355fb3a6cb506f0fbcf2a7aa24.jpg)
[CV] Wu Enda machine learning course notes | Chapter 8

Detailed explanation of uboot image generation process of Hisilicon chip (hi3516dv300)

图解GPT3的工作原理

SQL优化的魅力!从 30248s 到 0.001s

LeetCode 40:组合总和 II
随机推荐
[UTCTF2020]file header
[experience sharing] how to expand the cloud service icon for Visio
[performance pressure test] how to do a good job of performance pressure test?
《动手学深度学习》(四) -- 卷积神经网络 CNN
2022-07-06:以下go语言代码是否会panic?A:会;B:不会。 package main import “C“ func main() { var ch chan struct
[2022 CISCN]初赛 web题目复现
Detailed explanation of Kalman filter for motion state estimation
Tianqing sends instructions to bypass the secondary verification
[2022 ciscn] replay of preliminary web topics
测试周期被压缩?教你9个方法去应对
[GUET-CTF2019]虚假的压缩包
Common validation comments
Live broadcast platform source code, foldable menu bar
misc ez_ usb
[OBS] win capture requires winrt
misc ez_usb
buuctf misc USB
即刻报名|飞桨黑客马拉松第三期等你挑战
You Li takes you to talk about C language 6 (common keywords)
【VHDL 并行语句执行】