Question

Don't know why SLDV checks compatibility fail

Dear bros, My model update (Ctrl + D) and run (Ctrl +T) was OK. But when i used SLDV to check compatibilty, SLDV report failed ...

2 days ago | 1 answer | 0

Answered

calling mex function from Simulink

After you build mexw64 file successful, you can use S-Function block if not, you need to build mex file by mex from S-function ...

calling mex function from Simulink

After you build mexw64 file successful, you can use S-Function block if not, you need to build mex file by mex from S-function ...

2 days ago | 0

Answered

How to code this equation?

This formula mean Y = sum of all Y(i) value with i = 1:n I do not know what is Y(i) so can not write detai. Please refer symsu...

How to code this equation?

This formula mean Y = sum of all Y(i) value with i = 1:n I do not know what is Y(i) so can not write detai. Please refer symsu...

3 days ago | 0

| accepted

Answered

Hello why I get this error when I am going to set the path ?

You can fix as this link https://www.mathworks.com/matlabcentral/answers/437214-problems-with-set-path#answer_353904

Hello why I get this error when I am going to set the path ?

You can fix as this link https://www.mathworks.com/matlabcentral/answers/437214-problems-with-set-path#answer_353904

3 days ago | 1

Answered

strcmpi not returning 1

You need compare string from 2 variables leftend and rightend, but you are comparing 2 string 'leftend' , 'rightend'. Let remov...

strcmpi not returning 1

You need compare string from 2 variables leftend and rightend, but you are comparing 2 string 'leftend' , 'rightend'. Let remov...

3 days ago | 0

| accepted

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

3 days ago

Answered

How to use linspec

n = 9 when user want to generate integer cases of x in [-4, 4] if n = 1, so x alway = 4, it is no meaning

How to use linspec

n = 9 when user want to generate integer cases of x in [-4, 4] if n = 1, so x alway = 4, it is no meaning

4 days ago | 0

Answered

how can I read different data types from excel file

You also use readtable function data = readtable(FILE,'Sheet', 'sheet_name', 'ReadVariableNames', false);

how can I read different data types from excel file

You also use readtable function data = readtable(FILE,'Sheet', 'sheet_name', 'ReadVariableNames', false);

4 days ago | 0

Question

Search subarray closest other array

Dear all I want to search subarray closest other array as following. A = [4, 5.5, 7, 8.1, 1, 5, 6, 7, 8, 9]; B = [5.5, 6.2, 7...

5 days ago | 1 answer | 0

Submitted

Limit_Input_Change

Make output slowly close input when input change very big.

5 days ago | 1 download |

Answered

How to define a function with multiple names

As I know, you can't do it. You should create only 1 function and switch converting such as same following function out_val = ...

How to define a function with multiple names

As I know, you can't do it. You should create only 1 function and switch converting such as same following function out_val = ...

10 days ago | 0

Answered

Problem of comparison in Simulink Test Manager

I found problem. Time in baseline was not really right. Example: 3.0600000001 I fixed

Problem of comparison in Simulink Test Manager

I found problem. Time in baseline was not really right. Example: 3.0600000001 I fixed

10 days ago | 0

| accepted

Question

Problem of comparison in Simulink Test Manager

Dear all, I created test cases for simulink test manager, but when I compare, result at one time was not same which as followin...

11 days ago | 1 answer | 0

Question

Signal did not align

I using Simulink test and add base line result from excel file. But signal compare dis not align as following picture. Do y...

13 days ago | 1 answer | 0

Question

How to know actived transition between states

Dear bros, As we know, we can view state activity by using the Simulation Data Inspector or Active State Data as following link...

13 days ago | 1 answer | 0

Question

Simulink Design Verifier Dead Logic

I used simulink design verifier to check my state machine model. And some dead logics are detected. Red line is dead logic,...

24 days ago | 1 answer | 0

Answered

Help understanding example for Inlining Matlab S-function

You double click to Inport block, choose the Signal Attributes tab

Help understanding example for Inlining Matlab S-function

You double click to Inport block, choose the Signal Attributes tab

1 month ago | 0

| accepted

Answered

Prolemn with close Matlab folder

You need to check movefile function which you used is OK or NG Original, after cd command. 2. after use movefile 3. afte...

Prolemn with close Matlab folder

You need to check movefile function which you used is OK or NG Original, after cd command. 2. after use movefile 3. afte...

1 month ago | 1

| accepted

Answered

User-defined function is "unrecognized" in command window.

You copy only print_list function to other file and save print_list.m in Matlab It will be OK

User-defined function is "unrecognized" in command window.

You copy only print_list function to other file and save print_list.m in Matlab It will be OK

1 month ago | 1

| accepted

Answered

Square wave to bits in Simulink

You can write waveform data to workspace via To Workspace block or Scope

Square wave to bits in Simulink

You can write waveform data to workspace via To Workspace block or Scope

1 month ago | 0

Answered

Write a for loop that iterates from 1 to numberSamples to double any element's value in dataSamples that is less than minValue. Ex: If minVal = 10, then dataSamples = [2, 12, 9, 20] becomes [4, 12, 18, 20].

Let's try minVal = 10; dataSamples = [2, 12, 9, 20]; dataSamples(find(dataSamples <= minVal)) = dataSamples(find(dataSamples...

Write a for loop that iterates from 1 to numberSamples to double any element's value in dataSamples that is less than minValue. Ex: If minVal = 10, then dataSamples = [2, 12, 9, 20] becomes [4, 12, 18, 20].

Let's try minVal = 10; dataSamples = [2, 12, 9, 20]; dataSamples(find(dataSamples <= minVal)) = dataSamples(find(dataSamples...

1 month ago | 0

Answered

how to run multiple xlsx files once

You can use following steps: % select path work_path = uigetdir('pwd', 'Select folder'); % find all xlsx files in folder %...

how to run multiple xlsx files once

You can use following steps: % select path work_path = uigetdir('pwd', 'Select folder'); % find all xlsx files in folder %...

1 month ago | 0

Answered

finding the position of values in a matrix

Try [~,idx]=setdiff(X,Y,'rows'); idx_rows=setdiff(1:size(X,1),idx); idx_rows = 2 3 4 6 7

finding the position of values in a matrix

Try [~,idx]=setdiff(X,Y,'rows'); idx_rows=setdiff(1:size(X,1),idx); idx_rows = 2 3 4 6 7

1 month ago | 0

Answered

Getting particular number from 2 rows.

Let 's try a = {'Scenario_1_mode_1', 'Scenario_2_mode_1', 'Scenario_3_mode_1', 'Scenario_4_mode_1'}; a = a'; for i=1:lengt...

Getting particular number from 2 rows.

Let 's try a = {'Scenario_1_mode_1', 'Scenario_2_mode_1', 'Scenario_3_mode_1', 'Scenario_4_mode_1'}; a = a'; for i=1:lengt...

1 month ago | 0

Answered

how to select specific column and rows in excel

You can use readtable for import data from excel to MATLAB https://www.mathworks.com/help/matlab/import_export/read-spreadsheet...

how to select specific column and rows in excel

You can use readtable for import data from excel to MATLAB https://www.mathworks.com/help/matlab/import_export/read-spreadsheet...

1 month ago | 0

Answered

Extension change from .txt to .Z14

You can copy file as following file1='A.txt' file2=strrep(file1,'.txt','.Z14') copyfile(file1,file2)

Extension change from .txt to .Z14

You can copy file as following file1='A.txt' file2=strrep(file1,'.txt','.Z14') copyfile(file1,file2)

1 month ago | 1

| accepted

Answered

defining simulink variables through matlab srcript

You can create variables to workspace and in simulink, enable acess to base workspace. For create variables via script, let 's ...

defining simulink variables through matlab srcript

You can create variables to workspace and in simulink, enable acess to base workspace. For create variables via script, let 's ...

1 month ago | 0

Solved

Convert given decimal number to binary number.

Convert given decimal number to binary number. Example x=10, then answer must be 1010.

1 month ago

Solved

Find the longest sequence of 1's in a binary sequence.

Given a string such as s = '011110010000000100010111' find the length of the longest string of consecutive 1's. In this examp...

1 month ago

Answered

I am trying to create a game where a user guesses a number between 1 and 100 using a while loop. But I am getting stuck in an infinite loop. Please help?

Let 's try y=randi(100); while (1) prompt= '\nguess a value between 1 and 100: '; x=input(prompt); if (...

I am trying to create a game where a user guesses a number between 1 and 100 using a while loop. But I am getting stuck in an infinite loop. Please help?

Let 's try y=randi(100); while (1) prompt= '\nguess a value between 1 and 100: '; x=input(prompt); if (...

1 month ago | 2