Answered
how to retrieve the Simulink execution order from the workspace
As far as I know there isn't really an easy way to do this (i.e. using get_param or similar). Instead you have to debug your mod...

9 years ago | 0

| accepted

Answered
HELP PLEASE!! How do I print matlab "1:5 multiply increases each line"
Do you mean like this? clc fprintf(' SGD USD GBP EURO \n') for x= 1 : 5 USD = 0.69 * 2 * x; GBP = 0...

9 years ago | 1

Answered
In Matlab r2010b, how to find that string contains japanese character?
Depends on what you define as Japanese. The Hiragana characters have an Unicode range from 12352-12447, while the Katagana chara...

9 years ago | 3

Answered
Letter refer to number
Nr2 = double(Letter)-'A'+1

9 years ago | 0

| accepted

Answered
how to create a data buffer in simulink
I believe the _Tapped Delay_ block should do what you are requesting. You can find this block in the Simulink Library Browser un...

9 years ago | 1

| accepted

Answered
Summing different set of arrays.
nYear = 2002; nValue = 14; x = [7 10 2001 24 10 5 1 7 10 2001 14 15 2 1 7 10 2001 14 13 2 9 ...

9 years ago | 0

| accepted

Answered
how to convert model from continuous state space with disturbance to discrete
% Create state space model sys = ss(A,B,C,D); % Convert to discrete, where dt is your discrete time-step (in seconds...

9 years ago | 2

Answered
Cutting a certain pattern from an array
A = [1 2 3 4 5 6 0 0 0 0 1 2 3 4 5 6 7 8 9 10 0 0 0 0]; B = [0 0 0 0]; C = A(setxor(cell2mat(arrayfun(@(x)(x:x+lengt...

9 years ago | 1

| accepted

Answered
How to implement the counter (really simple)?
Infeasibles = any((A<=0) | (B>100),2);

9 years ago | 0

Answered
Why does char give me an empty output?
This is because ASCII characters 1 to 7 are not visible characters. See the 'Dec' column: <http://www.asciitable.com/>

9 years ago | 1

Answered
How to select a value in filter dropdown in excel
You might find it a lot easier to just write this specific functionality as an Excel macro, and then invoking the macro from MA...

10 years ago | 1

Answered
i want to change the value in some specific rows how can i do it
A = [1 2 3; 1 2 3; 1 2 3; 1 2 3; 1 2 3; 1 2 3] % Change Row 2 A(2,:) = [9 8 7]; % Change Row 5 A(5,:) = [5 5 ...

10 years ago | 0

Answered
Why can I not get the modaldlg function to work? eg. user_response = modaldlg('Title','Confirm Close');
Try one of the following, depending on the type of dialog you want: user_response = errordlg('Error','Confirm Close', 'moda...

10 years ago | 0

| accepted

Answered
remove first s and last t rows of a matrix containing NaN, leave lows in the middle containing NaN.
Nobody should ever need more than one line: A = [[NaN;NaN;NaN;4;1;NaN;5;6;8;NaN;NaN],[NaN;NaN;2;7;6;5;NaN;6;18;2;NaN]]; ...

10 years ago | 0

Answered
using add_block in a for loop
I see you have defined a source block ('NPC_MMC_Library/Submodule'), however your destination doesn't appear to include the mode...

10 years ago | 0

| accepted

Answered
Vehicle dynamics model simulink
1. Make sure all your inport are connected to a source (signal generator, constant, etc). 2. Make sure all your outports are ...

10 years ago | 0

| accepted

Answered
Select elements of Matrix?
Like so: P = magic(20); Q = P(end-17:end,end-17:end); Or this, as I assume you mean rows/columns 3 to 20 - otherwise...

10 years ago | 0

Answered
How can I find the max of two vectors?
Do you actually want to sort by sum of columns? For example: a = [4.84 3.55 2.09 4.20 1.14 5.15 2.45 3.41 1.66 2.75 3.8...

10 years ago | 1

| accepted

Answered
Delete rows that have the first same value and keep one row in matrix with 2 colums?
Do you mean something like this? x = [0,0 ; 250,1050 ; 250,1051 ; 1173,3050 ; 1173 3150]; [~,idx] = unique(x(:,1)); ...

10 years ago | 2

Answered
how do i fix "inner matrix dimensions must agree" in this formula?
Some of your defined vectors are of a fixes size, for example: rad=(0:0.01:0.15); theta=(0:24:360); Therefore your ...

10 years ago | 0

| accepted

Answered
Recreating the debouncer example in Simulink
You can use integrators as counters. Check for your desired state (TRUE or FALSE), then convert this TRUE signal into a double/s...

10 years ago | 4

| accepted

Solved


All capital?
Are all the letters in the input string capital letters? Examples: 'MNOP' -> 1 'MN0P' -> 0

10 years ago

Solved


Create a row array using double colon operator
Create a row array from 9 to 1, using the double colon operator.

10 years ago

Answered
Error with mvnrnd function?
The function *mvnrnd* is part of the statistics toolbox. Firstly, in order to use this function you have to have the Statistics ...

10 years ago | 0

| accepted

Answered
Timer to send a new message?
I would probably use a resettable integrator for this task. Feed the integrator a constant value of '1', that way it will act as...

10 years ago | 1

| accepted

Answered
Insert Values of a Matrix from row 2 using XLSWRITE
A = ones(5,20); xlswrite('Workbook.xls',A,'Sheet1','A2')

10 years ago | 0

| accepted

Answered
How can I avoid infinite while loop?
You have an infinity loop because your seed (N) is starting at one. Note that your equation ((N*2)+(N+1))/N is in fact equal to ...

10 years ago | 0

Answered
Simulink const block referencing changing variable doesn't update during simulation
Unfortunately unless you call 'set_param' the value of the variable will not be re-evaluated. Therefore calling 'set_param' is t...

10 years ago | 1

| accepted

Answered
How can i run two different clock at different (desired) times in simulink?
You can create a 'clock' using a discrete integrator. For example if you can set the time-step of the integrator equal to model ...

10 years ago | 1

| accepted

Load more