当前位置:网站首页>[Matlab] Simulink 同一模块的输入输出的变量不能同名
[Matlab] Simulink 同一模块的输入输出的变量不能同名
2022-07-06 10:39:00 【廉价喵】
对于一个简单的例子:
能跑通:
Test1
function y = fcn(u)
y = ones(3,4);
Test2
function y = fcn(u)
y = ones(4,3)*u;
会报错:
Test1
function y = fcn(u)
y = ones(3,4);
Test2
function u = fcn(u)
u = ones(4,3)*u;
这时报的错是 Test2 中的 u 维数不匹配
但是很奇怪的是,按理说这个 u 应该是直接被覆盖了,不应该考虑原来的维度
所以说同一模块的输入输出的变量不能同名,可能 Simulink 中的模块就是这么智障
当然同名带来的结果还不止于此,这个问题是我看朋友出现的 ,他那里设置了输入输出同名之后,在那个模块没有报错,但是输出会出错,我一时间不知道怎么复刻一遍……
边栏推荐
- 2022暑期项目实训(三)
- Use cpolar to build a business website (1)
- Wchars, coding, standards and portability - wchars, encodings, standards and portability
- Declval of template in generic programming
- SAP Fiori 应用索引大全工具和 SAP Fiori Tools 的使用介绍
- atcoder它A Mountaineer
- Distiller les connaissances du modèle interactif! L'Université de technologie de Chine & meituan propose Virt, qui a à la fois l'efficacité du modèle à deux tours et la performance du modèle interacti
- Docker installation redis
- Shangsilicon Valley JUC high concurrency programming learning notes (3) multi thread lock
- [sword finger offer] 60 Points of N dice
猜你喜欢
Tree-LSTM的一些理解以及DGL代码实现
Jerry is the custom background specified by the currently used dial enable [chapter]
Docker安装Redis
Virtual machine VirtualBox and vagrant installation
Top command details
当保存参数使用结构体时必备的开发技巧方式
从交互模型中蒸馏知识!中科大&美团提出VIRT,兼具双塔模型的效率和交互模型的性能,在文本匹配上实现性能和效率的平衡!...
30 分钟看懂 PCA 主成分分析
传输层 拥塞控制-慢开始和拥塞避免 快重传 快恢复
Take you through ancient Rome, the meta universe bus is coming # Invisible Cities
随机推荐
Docker安装Redis
Common - magic number 7
2022暑期项目实训(三)
This article discusses the memory layout of objects in the JVM, as well as the principle and application of memory alignment and compression pointer
declval(指导函数返回值范例)
DOM Brief
Prophet模型的简介以及案例分析
30 分钟看懂 PCA 主成分分析
Xu Xiang's wife Ying Ying responded to the "stock review": she wrote it!
SQL优化问题的简述
Running the service with systemctl in the container reports an error: failed to get D-Bus connection: operation not permitted (solution)
文档编辑之markdown语法(typora)
Will openeuler last long
ADB common commands
2022 Summer Project Training (III)
First, look at K, an ugly number
虚拟机VirtualBox和Vagrant安装
MySQL查询请求的执行过程——底层原理
Excellent open source fonts for programmers
传输层 拥塞控制-慢开始和拥塞避免 快重传 快恢复