当前位置:网站首页>[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 中的模块就是这么智障
当然同名带来的结果还不止于此,这个问题是我看朋友出现的 ,他那里设置了输入输出同名之后,在那个模块没有报错,但是输出会出错,我一时间不知道怎么复刻一遍……
边栏推荐
- FMT open source self driving instrument | FMT middleware: a high real-time distributed log module Mlog
- 2022暑期项目实训(一)
- 【.NET CORE】 请求长度过长报错解决方案
- Bonecp uses data sources
- With the implementation of MapReduce job de emphasis, a variety of output folders
- Markdown grammar - better blogging
- 从交互模型中蒸馏知识!中科大&美团提出VIRT,兼具双塔模型的效率和交互模型的性能,在文本匹配上实现性能和效率的平衡!...
- Grafana 9.0 is officially released! It's the strongest!
- Windows connects redis installed on Linux
- Numerical analysis: least squares and ridge regression (pytoch Implementation)
猜你喜欢

Implementation of queue

使用cpolar建立一个商业网站(1)

1700C - Helping the Nature

30 minutes to understand PCA principal component analysis

287. Find duplicates

Docker安装Redis

Compilation principle - top-down analysis and recursive descent analysis construction (notes)

UDP protocol: simple because of good nature, it is inevitable to encounter "city can play"

【Swoole系列2.1】先把Swoole跑起来

Distill knowledge from the interaction model! China University of science and Technology & meituan proposed virt, which combines the efficiency of the two tower model and the performance of the intera
随机推荐
bonecp使用数据源
第三季百度网盘AI大赛盛夏来袭,寻找热爱AI的你!
SQL优化问题的简述
【.NET CORE】 请求长度过长报错解决方案
【Swoole系列2.1】先把Swoole跑起来
徐翔妻子应莹回应“股评”:自己写的!
Coco2017 dataset usage (brief introduction)
当保存参数使用结构体时必备的开发技巧方式
Docker安装Redis
2022暑期项目实训(三)
监控界的最强王者,没有之一!
Windows连接Linux上安装的Redis
Interview shock 62: what are the precautions for group by?
Some understandings of tree LSTM and DGL code implementation
Self supervised heterogeneous graph neural network with CO comparative learning
Grafana 9.0 正式发布!堪称最强!
Transport layer congestion control - slow start and congestion avoidance, fast retransmission, fast recovery
Take you through ancient Rome, the meta universe bus is coming # Invisible Cities
Common - magic number 7
atcoder它A Mountaineer