Answered
How can I prevent a new MATLAB session from being opened when using mlDiff from git-bash (git for Windows)?
Could you use "!" in the MATLAB command window? for example !git diff fileName Run External Commands, Scripts, and Programs ...

6 years ago | 0

Solved


Add two numbers
Calculate the sum of two numbers. Example input = [2 3] output = 5

6 years ago

Solved


Tell me the slope
Tell me the slope, given a vector with horizontal run first and vertical rise next. Example input: x = [10 2];

6 years ago

Solved


Whether the input is vector?
Given the input x, return 1 if x is vector or else 0.

6 years ago

Solved


How to subtract?
*&plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn* * Imagine you need to subtract one...

6 years ago

Solved


Is this triangle right-angled?
Given three positive numbers a, b, c, where c is the largest number, return *true* if the triangle with sides a, b and c is righ...

6 years ago

Solved


Check if number exists in vector
Return 1 if number _a_ exists in vector _b_ otherwise return 0. a = 3; b = [1,2,4]; Returns 0. a = 3; b = [1,...

6 years ago

Solved


Weighted average
Given two lists of numbers, determine the weighted average. Example [1 2 3] and [10 15 20] should result in 33.333...

6 years ago

Answered
How to load a two-dimensional array using 'From File ' block in Simulink
Please download model and .mat file attached. (created by R2019b) And execute following script. model = 'signal_5model'; % def...

6 years ago | 0

| accepted

Answered
How to display signal dimensions on signal lines?
Hello Starhowl, I attached the signal line display procedure as a .gif file. Regards, stozaki

6 years ago | 0

| accepted

Answered
Generate a HDL IP Core using MATLAB command line
Hello, Please refer following documentation. Run HDL Workflow with a Script Regards, stozaki

6 years ago | 0

Answered
Change value for another value
Hello Sarah, Sample code with a reduced number of arrays. In your case, it's an array of 99999 values, not an array of 25 valu...

6 years ago | 1

Answered
Where's the debug tab? Update: Solution found: Documentation didn't match Matlab-version!
Hello Starhowl, I have attached the steps to show the debug window. You need to place at least one Simulink block on the canvas...

6 years ago | 0

| accepted

Solved


Most nonzero elements in row
Given the matrix a, return the index r of the row with the most nonzero elements. Assume there will always be exactly one row th...

6 years ago

Answered
How to prevent addition from showing up in command window
If you get only 1000, you can try following script. N=10; err=1; while err>10^-3 N=N+1; total=0; for n=1:N y...

6 years ago | 0

| accepted

Answered
Using complex structure in simulink constant block
Hello, Please try attached model. execute bus object definition file. Simulate model. MathWorks dcoumentation : Simulink.B...

6 years ago | 1

| accepted

Answered
Fixed point tool conversion
Please try following script. model = 'modelName'; % define your model name sud = [model '/sud']; % define system under design ...

6 years ago | 1

Answered
How to Configure simulink out-ports to generate specific argument of function?
Hello Amit, How do you use model referencing? You can add arguments by using a model reference and setting the storage class...

6 years ago | 0

| accepted

Answered
Downgrade to R2018a (from R2019b) to use logintimeout funtion didn't work.
Please refer following answer logintimeout using Database toolbox in R2019a

6 years ago | 0

| accepted

Answered
How to import an excel file that contains an absolute time column?
Hello Please define a return value of xlsread. for example.. [~,~,raw] = xlsread('ECUSIMTEST0000-000-01.csv') raw = 13×...

6 years ago | 0

Answered
How to open .slx files created in R2019b using R2019a
Hello Richard, Do you use Simulink in your PC? Please try following command and refer the MathWorks document. Simulink.export...

6 years ago | 0

Answered
Illegal Fixed-Point Data Type: the number of bits exceeded the supported maximum?
Hello TarikTech, The maximum 'word length' supported by Fixed-Point Designer is 128. It looks like the word length has exceeded...

6 years ago | 1

| accepted

Answered
Simulink ブロックの前景色のデフォルトカラーを変えるには
ご質問ありがとうございます。 問題は解決されましたでしょうか? 調べてみたのですが、Simulinkの既定の設定を変更するには set_param(0,'プロパティ名','設定値') を使用します。しかし、設定可能なプロパティにブロックの背景色...

6 years ago | 0

| accepted

Answered
Errors in 'MATLAB Function' Block in a Simulink model for a Polynomial Trajectory (Matlab 2019a)
I think that 'sum_vector' is variable size output. So, it should define as 'coder.varsize('sum_vector',[min max])'. I have conf...

6 years ago | 0

Answered
"At least one 'end' is missing: the statement may begin here"
Please try following script. k=1 for k=1:20 disp(k) if mod(k,2)==0 disp("na") elseif mod(k,3)==0 di...

6 years ago | 0

Solved


Find all elements less than 0 or greater than 10 and replace them with NaN
Given an input vector x, find all elements of x less than 0 or greater than 10 and replace them with NaN. Example: Input ...

6 years ago

Answered
how to access the variable value declared in constant block using get_param command.
Hello Ravi, Did you solve this problem? Please try following script. a = 1; % define the value of 'a' blkValue = get_param(gc...

6 years ago | 1

| accepted

Solved


Check if sorted
Check if sorted. Example: Input x = [1 2 0] Output y is 0

6 years ago

Answered
find-system command
Hello zineb, Your command has two mistakes. 1. find-system : find_system 2. 'Type' : 'BlockType' Please try following script...

6 years ago | 0

Solved


Return the first and last character of a string
Return the first and last character of a string, concatenated together. If there is only one character in the string, the functi...

6 years ago

Load more