Domanda

How to use fsolve solution as its initial values for the next step size

Hi, I want to solve a system of nonlinear equations (having sine and cosine) inside a user-defined function in Simulink. It wor...

circa 5 anni fa | 1 risposta | 0

Domanda

faster version of "fsolve" function

Does anybody know a function in MATLAB that can perform a similar job as "fsolve" does but faster? I have a user-defined functio...

oltre 5 anni fa | 0 risposte | 0

Domanda

How to combine pre-saved plots (.fig) into one figure?

Hi, I have several pre-saved plots in format .fig and I want to combine them together with different colors. Any simple functio...

oltre 5 anni fa | 1 risposta | 0

Domanda

How to copy a complex matrix in the workspace to an m-file?

I need to copy a large complex matrix from the workspace to be saved in m-file as a matrix (notice the complex sign (i or j or 1...

quasi 6 anni fa | 1 risposta | 0

Domanda

Multiplying [16x16] matrix with [16x1] vector in Simulink?

I have a matrix A (=16x16) multiplied by the vector B (=16x1): Result=A (16x16) * B (16x1) Using Simulink (The rest of t...

quasi 6 anni fa | 0 risposte | 0

Domanda

Solving DAEs problem with different initial conditions at different times of simulation using ode15s

I have a set of DAEs that I solved it using ode15s. Now, I want to solve the same problem but the initial conditions are changed...

quasi 6 anni fa | 1 risposta | 0

Domanda

Tuning transfer function to get only positive parameters using Simulink

I have a transfer function with order three in both numerator and denominator. I am tuning the block using the control system tu...

circa 6 anni fa | 1 risposta | 0

Domanda

Stiff Delay Differential Equations

Does anybody know how to solve STIFF differential equations with delay in time? The solvers in Matlab (dde23,...) are for non-st...

circa 6 anni fa | 2 risposte | 1

Domanda

What function in Matlab is equivalent to the block in Simulink "Transport Delay"?

I want to use a delay function that does exactly what the block in Simulink "Transport Delay" does. I tried to use the function ...

circa 6 anni fa | 1 risposta | 0

Domanda

Updating Initial Conditions from last calculated values

I am trying to find a way to update the initial conditions (x0=[y1,y2,y3,y4,y5]) needed for fsolve in Simulink using Matlab Func...

oltre 6 anni fa | 1 risposta | 0

Domanda

Why am I getting a "Signal Dimension" error?

I am wondering why I get the following error message. There is no problem with the signal dimension as shown.Also, I am not usin...

oltre 6 anni fa | 2 risposte | 0

Risposto

How to pass a variable from one file to another?

Also, I added a block "To Workspace" with the name "B" but still B is undefined.

How to pass a variable from one file to another?

Also, I added a block "To Workspace" with the name "B" but still B is undefined.

oltre 6 anni fa | 0

Domanda

How to pass a variable from one file to another?

Hi all, I have a matlab function block in Simulink with a feedback. The input to the function is a constant that changes with t...

oltre 6 anni fa | 2 risposte | 0

Domanda

ode15s is not supported when used in matlab-fn block in simulink

I have a code solves DAEs using ode15s fn. However, when I copy it into matlab function block in simulink, it does not work and ...

oltre 6 anni fa | 1 risposta | 0

Domanda

Solving a system of nonlinear algebraic equations numerically

I was wondering if there is a function for solving a system of nonlinear algebraic equations numerically. My equations are made ...

oltre 6 anni fa | 2 risposte | 0

Domanda

How to add a new graph with keeping the old one plotted?

I have a 14-node graph with a connectivity matrix A: A= [ 0 -1 0 0 -1 0 0 0 0 0 ...

oltre 6 anni fa | 1 risposta | 1

Domanda

Plot two different data having the same xy-location

I am using the graph plot function to plot some data having the same xy-location. However, I want to highlight some of these dat...

oltre 6 anni fa | 1 risposta | 0

Domanda

Add a constraint to Ax>b using intlinprog

I have a matrix A with m rows (eq's) and n columns (variable) where Ax>b; each row in A has a specific value in b. I want to add...

oltre 6 anni fa | 1 risposta | 0

Domanda

Replacing repeated values in each row with zero

I have a matrix A: A=[ 2 4 6 7 8 9 10 28 6 9 10 11; 2 4 6 7 ...

oltre 6 anni fa | 1 risposta | 0

Domanda

Create and plot random points with connected lines

I wondered if there is a way to plot random points I know the total number of them, and then plot the lines that connect them. T...

oltre 6 anni fa | 2 risposte | 0

Domanda

"nchoosek" function for a matrix whose all elements are 0 or 1

I have a matrix A whose all elements are 0 or 1. For example, the first row of A is: [ 0 0 1 0 0 1 ...

oltre 6 anni fa | 1 risposta | 0

Domanda

Create a vector that gives the information about the locations of each element

I have the vector A: A=[1 3 7], and I want to create another array, say B, that contains the locations of the elements of A. ...

oltre 6 anni fa | 1 risposta | 0

Domanda

How to tell matlab that all x's to be found are either one or zero using "intlinprog"

I want to solve an integer linear programming problem and I want to tell the solver "intlinprog" that all x's in the problem (sh...

oltre 6 anni fa | 1 risposta | 0

Domanda

(AX < b) instead of (AX <= b) using the solver " intlinprog "

I was wondering if there is an option (smaller than (<)) instead of (<=) using the solver "intlinprog". There is only the option...

oltre 6 anni fa | 2 risposte | 0

Domanda

Find random locations of a network that make no overlap between the lines connect them

I am not sure if this is possible in Matlab; I have a network consists of hundreds of nodes P(X,Y) with hundreds of branch (line...

oltre 6 anni fa | 1 risposta | 0

Domanda

Replace an element in a matrix if it's a member of an array with zero

I have a matrix A and an array B, I want to find any element in A that exist in B and replace it with zero. Any idea? Thanks

oltre 6 anni fa | 1 risposta | 0

Domanda

Solve Ax <= b with some unknown values of [b]? but with a relationship between them

I am using the solver "intlinprog" to solve an integer linear programming problem with inequality Ax<=b. This is one case I have...

oltre 6 anni fa | 1 risposta | 0

Domanda

How to enforce the optimization solver to include some particular x's

I am working on Mixed-Integer Linear Programming problem using "intlinprog" solver. I want the solver to include some places (le...

oltre 6 anni fa | 1 risposta | 0

Domanda

"intlinprog" error

I am trying to add some options to my solver (intlinprog) for my integer-linear-programming problem. Why do I get an error for m...

oltre 6 anni fa | 3 risposte | 0