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

oltre 9 anni fa | 1

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

oltre 9 anni fa | 0

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

oltre 9 anni fa | 0

| accettato

Risposto
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]]; ...

oltre 9 anni fa | 0

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

oltre 9 anni fa | 0

| accettato

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

oltre 9 anni fa | 0

| accettato

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

oltre 9 anni fa | 0

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

oltre 9 anni fa | 1

| accettato

Risposto
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)); ...

oltre 9 anni fa | 2

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

oltre 9 anni fa | 0

| accettato

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

oltre 9 anni fa | 4

| accettato

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

oltre 9 anni fa | 0

| accettato

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

oltre 9 anni fa | 1

| accettato

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

oltre 9 anni fa | 0

| accettato

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

oltre 9 anni fa | 0

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

oltre 9 anni fa | 1

| accettato

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

oltre 9 anni fa | 1

| accettato

Risposto
Undefined function 'tr' for input arguments of type 'double
The error is pretty self-explanatory, you are missing the function 'tr'. The function needs to be on your path (if it exists), o...

oltre 9 anni fa | 0

| accettato

Risposto
Convert variable-width text file numbers to UINT8 table?
It's not very elegant, and it's not very efficient - so enjoy: nRaw = {'130 216 165 154 233 210 209 129' ' 63 ...

quasi 10 anni fa | 0

Risposto
The data is not correctly written with CSVWRITE, after 100000 rows
You could use fprintf instead. fid = fopen('test.csv','w'); fprintf(fid,'%0.2f\n', [0:0.01:1100]);

quasi 10 anni fa | 0

Risposto
Out of memory issue
For large CSV files you are less likely to run into memory issues if you read it line by line, for example: nFile = 'file.c...

quasi 10 anni fa | 0

Risposto
S-function dimension matching problem with lots of "Terminator" blocks
_"we all know that in S-function block, the input dimension must be SAME as output dimension"_ I'm really not sure where you ...

oltre 10 anni fa | 0

Risposto
when i run the below code i get an error picture1 does not exist..where should i save the image to get the results
From the MATLAB help relating to imread: _If the file is not in the current directory or in a directory in the MATLAB path, s...

quasi 11 anni fa | 0

Risposto
Function 'ss' implicitly resolved in the MATLAB workspace. Implicit evaluation in MATLAB is not supported. Please declare this function extrinsic using eml.extrinsic('ss'), or call it using feval.
What this error message is saying is that in order to use the state space function (ss) Simulink has to call the MATLAB workspac...

quasi 11 anni fa | 1

Risposto
Axis dimensions in points
Here is an example of what I think you want to do: plot(1:10,1:10); h = gca; set(h, 'Units', 'Points'); nPos = get...

quasi 11 anni fa | 0

| accettato

Risposto
Error when using the same program on an other computer
The 'parfor' functionality is part of the Parallel Processing Toolbox. I would assume that second computer doesn't have this too...

quasi 11 anni fa | 0

Risposto
"plus/minus" sign operator
Not exactly elegant, but it works: A = [1 2 3]; B = (dec2bin(0:2^length(A)-1) - '0'); C = sum(B .* repmat(A, 2^length...

quasi 11 anni fa | 0

Risposto
Dos command gives error
If you want to send commands to an executable you need to modify the call slightly. Try this: dos('"C:\Program Files\Or...

circa 11 anni fa | 1

| accettato

Risposto
what does this instruction means?
It means sfdr will take on the maximum value contained in the array ptot between element number nper+4 and element number N/2. ...

circa 11 anni fa | 0

| accettato

Carica altro