Info
此问题已关闭。 请重新打开它进行编辑或回答。
i want to set array or data set as an input in my simulink model ...please help me to do this..??
1 次查看(过去 30 天)
显示 更早的评论
here is my model....in this model i want to set this array [0.025 0.05 0.075 0.1 0.125 0.15 0.175 0.2] as my input.... also the ouput should be in array form... i want to check the output in scope (graphically). please help
0 个评论
此问题已关闭。
回答(1 个)
Birdman
2018-4-5
For this purpose, use From Workspace block. Check how I formed the data inside the block. Hope this helps. Let me know if it works for you.
14 个评论
sadia qasim
2018-4-5
hi ....thankyou firstly...but unfortunately i m not able to read the attached file...:( can you help me to do so ???
Birdman
2018-4-5
Right click on the file and select Save as. Then save it to your current directory and open it and run.
Birdman
2018-4-6
The model name is inputArray(1). Rename the model as inputArray by deleting the (1) part.
sadia qasim
2018-4-6
yess i did that previously ...is shows the same thing as i showed you in the picture
sadia qasim
2018-4-8
hi birdman ...can you please the file to older version of simulink ...then it may run in my matlab
sadia qasim
2018-4-9
编辑:sadia qasim
2018-4-9
thankyou soo much birdman ..you made my work easier ....thanks for your cooperation..... but when i tried to set this in my model the display shows something else..... i have send you two model ... in model p1 : i used from workspsce block ..the same way as you showed ...but output seems to be something else .. in p2 model : i used constant block and declared matrix as input parameters ....but also did not work .. Dd= [0.6096 1.219 1.8288 2.4384] This is the input ...and the output is SR and it should display this values ,SR = [1.704 1.682 1.669 1.66]....
sadia qasim
2018-4-9
编辑:sadia qasim
2018-4-9
plzz tell me which block should i use to set this array as input ( from wrokspace block or constant block) ..also SR (output) is my speed ratio which i want to see graphically which respect to Dd (input). please help me out ...
Birdman
2018-4-10
When you use From Workspace block, you need to provide a time vector, which should be your first column. I set it. See how I did it. Now it works.
sadia qasim
2018-4-10
you can see in the model that given Dd= [0.6096 1.219 1.8288 2.4384] as input, each value of this array will get divided by the constant 12.19214826 and ouput will be SR = [1.704 1.682 1.669 1.66].... But in your p2 edited file (using from workspace block) i can just see only one value gets displayed and in the worspace output is plotted with respect to time ..... I Have mention everything in the model ...please check it and help me to solve this either by workspace or constant....
此问题已关闭。
另请参阅
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 (한국어)