Réponse apportée
Matlab Margin Display From a Bode Plot Code
Assuming you have the Control System Toolbox, as you say there is already a function for computing the margins. If so, why not j...

plus de 2 ans il y a | 0

Réponse apportée
How to use cell as an input argument in an App?
You can add properties to your app and assign values to them, for example when the app is initialized. Then inside of your callb...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
Find path through logical matrix (only walking right or down)
It seems natural to think of this as a graph traversal question, where the nodes in a directed graph are the locations in the ma...

presque 3 ans il y a | 1

Réponse apportée
Reorganizing integer vector preserving order
I think this does what you are asking xp = [2 5 6 13 8 14 4 9 3 1 12 16 15 7 ...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
A way to make the Simulink program run and then perform the calculation
You can set the model's StopFcn call back for this purpose. Go to the Modeling tab, model settings, properties,callbacks, and a...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
Determining the response of the system to time-varying input in Simulink MATLAB
There are a number of ways you could apply this input signal. One simple way is to use the from workspace block, then use a scri...

presque 3 ans il y a | 0

Réponse apportée
Writing inside cell array
Is this what you are asking for? y = cell(3, N); for i = 1 : N y(:, i) = f(i); end

presque 3 ans il y a | 0

| A accepté

Réponse apportée
Why does two sine waves of different phase give different output after double integration?
There is not an any error. This is just the physics/calculus of the situation. In the first case (zero phase) the input acceler...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
I have several error for this code.Error line 138 and 141 . error [X,V,orig_size_v] = reshapeAndSortXandV(X,V); can you solve this error?
Cd = interp1(A1,cd1,A,'linear'); A1 has 37 elements, cd1 only has 36, to use the interp1 function the two first arguments must ...

presque 3 ans il y a | 0

Réponse apportée
Error using table (line 231) All table variables must have the same number of rows. Error in correct1 (line 35) disease_cure_table = table(all_diseases,all_Pests, all_cures,
When in your DiseaseCure.csv file you only have two columns, Diseases-Pests, and Cure and then you read these into the table dat...

presque 3 ans il y a | 0

Réponse apportée
Extra zeros added to a TF by zero()
Thanks for attaching your data. As suggested in my original comments, and by @John you are seeing the effect of pole zero canc...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
creating a warning dialog that wait until the user press ok, if the user press x the execution stops
Does the behavior demonstrated in my example below do what you want? for k = 1:10 if k ==3 % condition simulating duplicat...

presque 3 ans il y a | 1

Réponse apportée
Add all values from loop to an array
Let's say you want to store the values you have selected from each sheet in an array called outDat, you could modify your code t...

presque 3 ans il y a | 0

Réponse apportée
How to solve "Not enough input arguments."
You could also do it all with a very simple loop pentadiagonal(7) function pinaka = pentadiagonal(n) pinaka = zeros(n,n); ...

presque 3 ans il y a | 0

Réponse apportée
A way to speed up my custom interpolation algorithm?
You could try benchmarking this way too for comparison xe = [x inf] yq = y(xq >= xe(1:end-1) & xq <xe(2:end)) This returns ...

presque 3 ans il y a | 0

Réponse apportée
I'm trying to use the table function, How do I show all the outputs for each iteration?
You need to assign your values in the loop to arrays so that they are saved. Could do something like this: xl=1.5; xu=3; erro...

presque 3 ans il y a | 0

Réponse apportée
Find the heat rate exchanged by a cylindrical fin and find a conical fin geometry that exchanges the same heat rate
Let's say the heat exchange rate for the pin (cylindrical) fin for your specified geometry has been found to be equal to a valu...

presque 3 ans il y a | 0

Réponse apportée
Using ismember with some margin
You can use ismembertol for this SSnoisy = SS + randn(size(SS))*0.01 idx = find(ismembertol(BS,SSnoisy,0.05))

presque 3 ans il y a | 0

Réponse apportée
Use a subset of number to find the index in a bigger set
BS = [2.33, 4.55, 5.88, 3.98, 4.66, 7.99, 2.33, 9.55]; SS = [4.55 4.66 7.99]; idx = find(ismember(BS,SS))

presque 3 ans il y a | 0

| A accepté

Réponse apportée
Error using horzcat Dimensions of arrays being concatenated are not consistent
On line 34 H1 has m*(m-1) rows, but extra_cols only has m rows. So you can not horizontally concatenate H1 and extra_cols using ...

presque 3 ans il y a | 0

Réponse apportée
(0) I couldn't run this code on Matlab. I want to see the output generated from Simulink
You have many errors in your code. I have attached a cleaned up version that at least runs. I put a comment %** on each line I a...

presque 3 ans il y a | 1

Réponse apportée
How i can i Ensure that my 2 vectors have the same size?!
If you want DAPEAK_in to have the same dimension as DAPEAK_out then I assume you want both of them to have the same dimesion as ...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
Convert to array/cell
Define one function to do the work, and then call this same function from each of the callbacks

presque 3 ans il y a | 0

| A accepté

Réponse apportée
How to return random unique values based only on the value in each row for the first colomn?
Here's another way, with no loops % Example data matrix % I modified this a little from your example to have % multiple occu...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
how to fix error message Invalid expression as When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.
The specific error you get is for line 22 where you have legend('x_1', 'x_2', 'x_3', ... (list all the state variables), 'x_n')...

presque 3 ans il y a | 0

Réponse apportée
Attach first column with names to matrix with coordinates
You can put the data into a table, and assign row names For example x = rand(5,1); y=rand(5,1); z=rand(5,1); names = {'cat'...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
Array rows differences and array filling in a loop
This would be one way to do it A = [1 3;2 5;4 6;7 10;100 150;230 270]; % input array example [n,m] = size(A); % additional var...

presque 3 ans il y a | 1

Réponse apportée
Unable to perform assignment because the indices on the left side are not compatible with the size of the right side.
In the first iteration of the outer loop (mi = 1) Your variable Arr_LIS has 10 rows as kron(arrL_a(:,l), arrL_e(:,l)) is 10 b...

presque 3 ans il y a | 1

Réponse apportée
Run matlab with excel
You can use Spreadsheet Link for this type of application https://www.mathworks.com/products/spreadsheet-link.html

presque 3 ans il y a | 0

Réponse apportée
systems of equations, with constraints
If you have the optimization toolbox, you could use lsqnonlin, where your f(x) is the system of equations you show above, and yo...

presque 3 ans il y a | 1

Charger plus