Answered
Where is the declaration and definition of C code corresponding to min,max,abs blocks
math.h is standard library. So, mathematical functions are defined in math.h. https://en.wikipedia.org/wiki/C_mathematical_func...

7 months ago | 0

Answered
Assign fields to structure array in Simulink
You can use MATLAB Function as following. I attached example model and .mat included struct data.

7 months ago | 0

| accepted

Answered
How to round only two values after decimal point
You can use 'round' block and 'subtract' block.

7 months ago | 0

Solved


Back to basics 3 - Temp Directory
Covering some basic topics I haven't seen elsewhere on Cody. Return a string that is the path to the system's current temp di...

7 months ago

Solved


Back to basics 15 - Benchmark
Covering some basic topics I haven't seen elsewhere on Cody. Return an array of the benchmark values for MATLAB.

7 months ago

Solved


Number of toolboxes?
Return a number equal to the number of toolboxes available to the Cody solvers.

7 months ago

Solved


Return area of square
Side of square=input=a Area=output=b

7 months ago

Solved


Select every other element of a vector
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...

7 months ago

Answered
Why is the data saved in a struct when 'To Workspace' block is used?
"ans" is most recent answer. ans "out" is simulation output (default setting of model configuration)

7 months ago | 0

| accepted

Solved


Add two numbers
Add two numbers (For beginners)

7 months ago

Solved


Area of a triangle
A triangle is given with base *'b'* ,vertical hight *'h'* . then find it's area.

7 months ago

Answered
how do I compare simulink data dictionaries
Please try following script. Unzip attached file. execute the script. visdiff('dd1.sldd','dd2.sldd') For simple file differe...

7 months ago | 0

Answered
Simulink cache file won't open
That is the correct behavior. .slxc files are Simulink cache files. These files contain build artifacts that can speed up simul...

7 months ago | 0

| accepted

Answered
Modifying my fprintf code.
Please execute following script. for n=9:-1:2 theta=pi./n; solution=cos(theta); fprintf('cos(pi/%d) = %7.5f\n',n...

7 months ago | 0

Answered
Where is the declaration and definition of C code corresponding to min,max,abs blocks
For example, min block generate model.c and model.h. math.h is included in model.h

7 months ago | 0

Answered
Can anyone help me how many color representation are there in simulink?
It may have 16,777,216. Because There are 256 color settings for each of RGB.

7 months ago | 0

Answered
Pointer to Simulink Function
I attahced example model, hedder and souce C file. Please try to simulate there. Call C Library Functions in C Charts

7 months ago | 0

Solved


Times 2 - START HERE
Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

7 months ago

Answered
ブロックの背景色一括変更
Yamazaki様 以下の様なプログラムは如何でしょうか? ret = find_system(bdroot(gcs),'BlockType','Goto'); % モデル内からGotoブロックをリストする for N = 1:length(...

7 months ago | 0

| accepted

Solved


Find the index of elements in a string vector
In the vector of v, find the index of elements specified by a. v = ["Lion","Koara","Elephant","Snake","Dog","Cat","Camel"]; ...

7 months ago

Answered
Simulink/StateFlowにおけるバス信号への値の代入について
Atomi様 Stateflowの 場合を添付の例題モデルとして示します。(R2019bにて作成) バス信号を使うためには、先ずバスオブジェクトを定義して下さい。その定義したバス要素に代入する形でモデリング・シミュレーション出来ます。(myBus....

7 months ago | 0

Answered
How to export a simulink project (Not single model) to older version 2019a from newer version 2019b?/
Simulink Project won't export previous version now. This is Simulink Project limitation

7 months ago | 0

| accepted

Answered
HDL coder mapping error
I look like you are using the ISE web pack. The web pack does not support xc6vlx240t. web pack supports only xclx75T. If you use...

7 months ago | 0

Solved


Arrange Vector in descending order
If x=[0,3,4,2,1] then y=[4,3,2,1,0]

7 months ago

Answered
Simulink Model stuck in running mode indefinitely
@ADITYA You can use color space convesion block. I attached simple example model. Regards, stozaki

7 months ago | 0

Answered
How to create a buffer FIFO, filter and then save in an array values that are between an specific range of values?
I attached modified model you made. unbuffer is just for the description of the block. It is arranged to explain the difference...

7 months ago | 0

| accepted

Problem


Find the index of elements in a string vector
In the vector of v, find the index of elements specified by a. v = ["Lion","Koara","Elephant","Snake","Dog","Cat","Camel"]; ...

7 months ago | 1 | 12 solvers

Answered
Comparing and locating string values
Please try following command. ret = find(ismember(x,a)) ismember find

7 months ago | 1

| accepted

Solved


Flip the vector from right to left
Flip the vector from right to left. Examples x=[1:5], then y=[5 4 3 2 1] x=[1 4 6], then y=[6 4 1]; Request not ...

7 months ago

Answered
How to set output of MATLAB function block as fixed size?
* I attached model and Signal Object file. There are two ways. Set the dimensions in the properties of the output signal. U...

7 months ago | 1

Load more