MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn moreOpportunities for recent engineering grads.

Apply Today**New to MATLAB?**

Asked by Pat
on 5 Dec 2012

I have 5 values in workspace

xa=0.5100 0.7000 0.2300 0.5000 2.0000

In simulink i had used from workspace and u fuzzy.

but the output of the from block shows the value is only 4.please tell why do i get like this,why all 5 values are not passed to the simulink

*No products are associated with this question.*

Answer by Muruganandham Subramanian
on 5 Dec 2012

Edited by Muruganandham Subramanian
on 5 Dec 2012

Check whether your sample time of 'from workspace' block is inherited? Usually in 'from workspace', you have to mention both data and time as (i.e[data time]) like this. do you have same size of both or otherwise you may use delay block, i guess

Show 6 older comments

Pat
on 5 Dec 2012

Thats why i have posted this question ,my values in command window is

xa=0.5100 0.7000 0.2300 0.5000 2.0000

used from workspace in simulink,but only 4 values i get

## 8 Comments

## Azzi Abdelmalek

Direct link to this comment:http://www.mathworks.com/matlabcentral/answers/55771#comment_115446

What is "u fuzzy"?

## Pat

Direct link to this comment:http://www.mathworks.com/matlabcentral/answers/55771#comment_115447

sorry Azzi its fuzzy

## Azzi Abdelmalek

Direct link to this comment:http://www.mathworks.com/matlabcentral/answers/55771#comment_115448

Ok what is from workspace and fuzzy?

## Pat

Direct link to this comment:http://www.mathworks.com/matlabcentral/answers/55771#comment_115449

i have 5 values in workspace,which is input to fuzzy,so i created a fis file which is of 5 inputs,but i get error,my from workspace block shows it passes only 4 values

## Vishal Rane

Direct link to this comment:http://www.mathworks.com/matlabcentral/answers/55771#comment_115450

Did you try providing the time values as well ?

## Pat

Direct link to this comment:http://www.mathworks.com/matlabcentral/answers/55771#comment_115455

Time values,no i dont have time values juts those 5 values as input to fuzzy

## Muruganandham Subramanian

Direct link to this comment:http://www.mathworks.com/matlabcentral/answers/55771#comment_115487

without time value..how can you read it 'from workspace'?

## Pat

Direct link to this comment:http://www.mathworks.com/matlabcentral/answers/55771#comment_115492

ok if i such five values how to read from workspace,i need it to as input to fuzzy ,please assist