Convert matrix to constant

1 回表示 (過去 30 日間)
Muruganandham Subramanian
Muruganandham Subramanian 2011 年 10 月 10 日
Hi everybody, Am having sampled matrix data of size(194*1) in workspace. I have to import to simulink blocks of same samples (194 value). Give me suggestion pls.
Thank you in advance!!!!

回答 (1 件)

Fangjun Jiang
Fangjun Jiang 2011 年 10 月 10 日
Use the "From Workspce" block. Have your time vector and data vector arranged in two column format as below:
[t1,d1;
t2,d2;
t3,d3;
...
...]
  2 件のコメント
Muruganandham Subramanian
Muruganandham Subramanian 2011 年 10 月 17 日
hi,
If I am using this, am getting an error like this.
Error using ==> horzcat
CAT arguments dimensions are not consistent.
Is there any other way to solve this problem?
Fangjun Jiang
Fangjun Jiang 2011 年 10 月 17 日
Try a simple example first. In MATLAB Command Window, run this first.
t=(1:194)';
d=rand(194,1);
Then set the data for the "From Workspace" block as [t,d]. Remember, you need to set the data as two column with the same size. First column is time stamp, second column is your data.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeProgrammatic Model Editing についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by