How to store scalars(continuous data) as a vector
2 次查看(过去 30 天)
显示 更早的评论
V Vaishnavi Kumar
2012-10-27
an embedded matlab function block1 outputs scalars instantaneously, a set of sequential scalar outputs (ex: minimum 3 or more outputs) has to be stored as a vector, embedded fcn block2 accepts vector input and compares the elements in it, how instantaneous scalars can be stored as a vetor
采纳的回答
Azzi Abdelmalek
2012-10-27
编辑:Azzi Abdelmalek
2012-10-27
15 个评论
V Vaishnavi Kumar
2012-10-27
input vector size of embedded fcn2 is fixed only.....when i give a dutycycle to my power electronic converter(simulink model), my solar module(embedded fcn blck1) gives a power(scalar),
i m sending three dutycycles(d1 d2 d3) one by one, simultaneously corresponding power P1 P2 P3 should be sensed. i wanna concatenateP=[ P1 P2 P3 ], ........P is given embedded fcn block2(Particle swarm optimizer controller) for further processing.
what is repmat..using tat real time data could be stored..?
Azzi Abdelmalek
2012-10-27
you can see what repmat do, (help repmat), but it's not what you need, if I've understood what you need, is every step time you want concatenate p1, p2 and p3. Then what I suggest is to create a matlab function with one input(P1, then P2 then P3) sampled with ts and an output [P1 P2 P3] sampled with 3*ts. If it's what you want I will post a simulink model
V Vaishnavi Kumar
2012-10-28
yes i feel this s wat i want...i hope, i can give scalar output power in place of digitized sine-wave., or do i need to convert the scalar output to any digitized form ,
thanks a lot for this model, request you to post the simulink model..
V Vaishnavi Kumar
2012-10-28
i tried your simulink model, to check it i need to send three duty cycles (d1 d2 d3)to one terminal as mentioned earlier..d1 d2 d3 has to be sent one by one sequentially with delay,
tried with 1)multiport switch 2) mux delay combination.. dint work as desired..
Azzi Abdelmalek
2012-10-28
编辑:Azzi Abdelmalek
2012-10-28
Maybe you have'nt understood how it works,use the first input p1 to be sent to your desired block. at the same time the matlab function block is storing p1,p2,and p3 to be sent 3 ts after. What is the problem?
V Vaishnavi Kumar
2012-10-28
编辑:V Vaishnavi Kumar
2012-10-28
i understood the simulink model you sent, i simulated it seperately,it showed three values in P vector,[-0.9511 -0.5878 0], i took it as at 1st sample digital sine wave has the magnitude -0.9511,for 2nd sample mag is -0.5878.. so on..
>make me clear if i misunderstood
>at the input side without ZOH also, it showed same output, what's its specific purpose
Azzi Abdelmalek
2012-10-28
编辑:Azzi Abdelmalek
2012-10-28
Ok, the zoh will maintain the same output during its sample time. where I've used a unit delay I did'nt add a zoh, because a unit delay do the same thing (plus delaying)
V Vaishnavi Kumar
2012-10-29
thank u, i hope u had kept a digitized sinewave earlier, now it seems to be a continuous one, in my model, my solar module sends continuous data of power
do i need to make any analog to digital conversion..?
Azzi Abdelmalek
2012-10-29
Kumar, I can't answer this question, because I don't know what your program is doing.
V Vaishnavi Kumar
2012-10-31
编辑:V Vaishnavi Kumar
2012-10-31
k sir..the model u given is very much useful for me to develop my simulation model...
V Vaishnavi Kumar
2012-11-5
Sir,whether do i need a reset block to ZOH, whether will it store values for every sample...
V Vaishnavi Kumar
2012-11-5
my faculty raised this question, when ZOH1 holds the values of three sample, for the next sample time, will it hold the next sample value with out resetting,or wil it have the previous values stored before
I simulated the ZOH1 block with display1 in your model, kept a display2 before ZOH1,
I saw that display1 showed values before simulation finishes, values in display2 were changing,
how it could be interpreted...?
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!发生错误
由于页面发生更改,无法完成操作。请重新加载页面以查看其更新后的状态。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
- América Latina (Español)
- Canada (English)
- United States (English)
欧洲
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom(English)
亚太
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)