简体   繁体   English

嵌入式功能块为每个输入输出标量值,如何存储和比较三个或更多顺序输出?

[英]An embedded function block outputs scalar values for each input, how three or more sequential outputs can be stored and compared?

I tried using if else statement, but yielded no result. 我尝试使用if else语句,但没有结果。 Can this be done by connecting program block and simulink blocks? 是否可以通过连接程序块和simulink块来完成?

simple block dia 简单块直径

solarmodule--(power)-->controller---(dutycycle)-->converter-->load 太阳能模块-(电源)->控制器-(占空比​​)->转换器->负载

power from solar module is a scalar varying,im sending three dutycycles(d1 d2 d3) one by one, simultaneously corresponding power P1 P2 P3 should be sensed. 来自太阳能模块的功率是一个标量变化的,即一次发送三个占空比(d1 d2 d3),同时应感测到相应的功率P1 P2 P3。 i wanna concatenateP=[ P1 P2 P3 ], ........P is given embedded fcn block2(Particle swarm optimizer controller) for further processing. 我想要concatenateP = [P1 P2 P3],........ P被赋予嵌入式fcn block2(粒子群优化器控制器)以进行进一步处理。

If you want to save multiple scalar answers in matlab the answer is typically to store them in a vector. 如果要在Matlab中保存多个标量答案,则答案通常是将它们存储在向量中。

Suppose you want to store the i-th scalar output, then you just need something like 假设您要存储第i个标量输出,那么您只需要类似

A(i) = yourscalaroutput

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何以编程方式将Matlab功能块的输入和输出设置为其他simulink块? - How can I programmatically set the inputs and outputs of a Matlab Function block to other simulink blocks? 任何人都可以帮助将多个标量输出转换为矢量输出吗? - Can any anyone help to convert multiple scalar outputs into a vector output? 将父函数的输出与嵌套函数的输入相关 - Relate outputs of parent function to input of nested function 在MATLAB中用1个输入和3个输出对函数进行子图绘制 - Sub plotting a function with one input and 3 outputs in MATLAB 遍历三个数组,将函数应用于元素并将输出存储在矩阵中 - Loop through three arrays, apply function to elements and store the outputs in a matrix 在 Python/Numpy 中具有三个等效输出的 Matlab polyval 函数 - Matlab polyval function with three outputs equivalent in Python/ Numpy Simulink无法确定模块“ MATLAB功能”的输出大小和/或类型 - Simulink cannot determine sizes and/or types of the outputs for block 'MATLAB Function' 如何从 Matlab 中的 function 中提取输出? - how to extract outputs from function in Matlab? 如何在Matlab中将函数的输出存储到矩阵? - How to store outputs from a function to a matrix in matlab? Matlab:如何使用不同的函数输出 - Matlab: how to work with different outputs of function
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM