DISCLAIMER: Any advice or opinions posted here are my own, and in no way reflect that of MathWorks.

NOTE: Please do not send me individual messages or questions, as I will not be able to respond to them. If you have technical questions about MATLAB, please use the various resources on MATLAB Central. If you have a valid license, you can also use Technical Support.

Answered

Read and save multiple excel files into one spreadsheet in one excel file

Hello addy, I attach a simple sample script. Please save all files in the same folder and run the script. Regards, stoza...

Read and save multiple excel files into one spreadsheet in one excel file

Hello addy, I attach a simple sample script. Please save all files in the same folder and run the script. Regards, stoza...

10 días ago | 0

| accepted

Answered

Unable to add block in Simulink 2016 with add_block command

Hello Ruhi, Please try to edit line 7 as follows : Before : add_block('built-in/Inport', ['/Test' '/IN1'],'Position',[140 9...

Unable to add block in Simulink 2016 with add_block command

Hello Ruhi, Please try to edit line 7 as follows : Before : add_block('built-in/Inport', ['/Test' '/IN1'],'Position',[140 9...

13 días ago | 0

| accepted

Answered

save workspace BUT with another name!

please refer an following URL save save filename save ('filename') For example, if you want to save it as 'test', you would ...

save workspace BUT with another name!

please refer an following URL save save filename save ('filename') For example, if you want to save it as 'test', you would ...

4 meses ago | 1

| accepted

Submitted

SetInheritedPortName-Simulink-Utility

To set name of the port block and propagation signal name.

4 meses ago | 5 downloads |

Solved

Get the length of a given vector

Given a vector x, the output y should equal the length of x.

5 meses ago

Answered

Local variable created as global in code.

In the flowchart, initialize as a condition action before the condition.

Local variable created as global in code.

In the flowchart, initialize as a condition action before the condition.

5 meses ago | 0

Answered

How to plot multiple graphs from Simulink in Matlab

The workspace stores only the latest results, but if you use the signal log, the Simulation data inspector stores all the result...

How to plot multiple graphs from Simulink in Matlab

The workspace stores only the latest results, but if you use the signal log, the Simulation data inspector stores all the result...

5 meses ago | 0

Solved

Make the vector [1 2 3 4 5 6 7 8 9 10]

In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...

5 meses ago

Answered

Problems encountered when converting simulink model including look-up table to hdl code

please try to use my modified model.

Problems encountered when converting simulink model including look-up table to hdl code

please try to use my modified model.

5 meses ago | 1

| accepted

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...

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...

5 meses 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.

Assign fields to structure array in Simulink

You can use MATLAB Function as following. I attached example model and .mat included struct data.

5 meses ago | 0

| accepted

Answered

How to round only two values after decimal point

You can use 'round' block and 'subtract' block.

How to round only two values after decimal point

You can use 'round' block and 'subtract' block.

5 meses 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...

6 meses 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.

6 meses ago

Solved

Number of toolboxes?

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

6 meses 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...

6 meses 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)

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)

6 meses ago | 0

| accepted

Solved

Area of a triangle

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

6 meses 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...

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...

6 meses 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...

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...

6 meses 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...

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...

6 meses 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

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

6 meses 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.

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.

6 meses 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

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

6 meses 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:...

6 meses ago

Answered

ブロックの背景色一括変更

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

ブロックの背景色一括変更

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

6 meses 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"]; ...

6 meses ago