Question

Why `WriteMode` isn't working while appending data to xlsx?

I'm doing the following excelFilename = 'someFile.xlsx'; structFieldnames = fieldnames(myStruct); % <--- where myStruct is y...

9 Tage ago | 1 answer | 0

Question

Append character array to first row of a matrix

Hi there! I've the following struct array Astruct = struct with fields: data1: [10×5 double] data2: [10×5 doub...

9 Tage ago | 1 answer | 0

Question

Saving struct to excel

I've a struct in the following form Astruct = struct with fields: data1: [5001×16 double] data2: [5001×16 d...

9 Tage ago | 1 answer | 0

Question

Version control on mat files

Hi All, Is it possible to view the history of changes made to a mat file? Thanks

11 Tage ago | 1 answer | 0

Question

Question on how to position points on a line

I've the following to divide a line to equal segments ref xy1 = [141.64 399.53]; xy2 = [213.32 250.96]...

19 Tage ago | 1 answer | 0

Question

Defining persistent variables in a function

I've a function that is called multiple times function fun() persistent x y z if isempty(x) x = % end if isempty(y) y = ...

24 Tage ago | 1 answer | 0

Question

Optimizing code run time

Hi All, I've the following function function fun1() [t,x] = ode15s(@(t,s) fun2(t,x), tspan , x0 ,options); ...

24 Tage ago | 1 answer | 0

Question

fmincon converges to solution using interior-point but not using sqp

Hi All, I am solving an optimization problem using fmincon. The solver converges to a solution using interior-point algorithm...

etwa 2 Monate ago | 0 answers | 0

Question

Objective function increases but solver converges --- Why?

Hi All, I am trying to solve a constrained optimization problem in fmincon But I am not sure why the solver converges when...

etwa 2 Monate ago | 0 answers | 0

Question

How should the value of objective function be returned for fmincon?

Hello, I have an objective function that computes the difference between actual and predicted values. The value, f, computed ...

2 Monate ago | 1 answer | 0

Question

Why is the optimization problem solved by lsqnonlin but not by fmincon ?

Hi All, Equation 1: Equation 2: Equation 1 represents the exact dynamics of a system and equation 2 is the approximat...

2 Monate ago | 0 answers | 0

Question

Solving an optimization problem in fmincon with nonlinear constraints

Hi All, I have the following dynamical systems. Equation 1: Equation 2: Equation 1 represents the exact dynamic...

2 Monate ago | 1 answer | 0

Question

Passing extra output arguments from ode

I've the following code to obtain [t,x] after simulating odes . In addition to the solution, I also want to obtain the functiion...

2 Monate ago | 2 answers | 0

Question

How to set up parameter estimation in fmincon

Hi All, I have the following dynamical systems. Equation 1 represents the exact dynamics of a system and equation 2 is the ap...

2 Monate ago | 1 answer | 0

Question

Automatically generating constraints for fmincon

Hi All, I would like to know if it is possible to automatically generate trapezoidal collocation constraints using OptimTraj ...

2 Monate ago | 0 answers | 0

Question

How can I do this in MATLAB?

In pycharm, if I have a bunch of py files and let's say I have opened 1 file that calls a function defined in the other file. Cl...

2 Monate ago | 1 answer | 0

Question

Parameter estimation using fmincon - how to set up the problem in MATLAB?

I've an objective function of the form, Note: M,D arematrices. The second equation is the objective function that has to...

2 Monate ago | 0 answers | 1

Question

Sensitivity analysis of odes

Hi All, I'm solving a dynamical system uisng ode15s. The system has a lot of parameters and I'd like to perform sensitivity a...

2 Monate ago | 0 answers | 1

Question

installing CVX in MATLAB

Hi All, Is there any tutorial/documentation on how to install CVX optimization toolbox in MATLAB? Are there any dependencie...

2 Monate ago | 1 answer | 0

Question

Computing edge weights of a graph from time-series data of nodes

I've the following system of equations for studying information flow in the below graph, dI/dt = - M^TDM* I I is the ...

2 Monate ago | 0 answers | 0

Question

Specifying interpreter type for heatmap

I have the following heatmap and I want to set the title interpreter to none load patients tbl = table(LastName,Age,Gende...

3 Monate ago | 0 answers | 0

Question

Clear persisent variable in for loop

I've the following code function fun(i) persistent ss persistent s s = vercat(s,rand(1,2)) if i== 4 ss(j) = s ; ...

3 Monate ago | 1 answer | 0

Question

Save a non scalar struct

I've the following function function fun(i) var = true if var ss(i).bv = rand(10,1) if i == 4 pwd ...

3 Monate ago | 2 answers | 0

Question

Save the results of a non scalar struct

I've the following function function fun(i) var = true if var ss(i).bv = rand(10,1) if i == 4 pwd ...

3 Monate ago | 0 answers | 0

Question

ode solver , restart from where the simulation ended

Hi, I am using ode solver to simulate a system of differential equations. tspan = 0:0.0001:1 [t s] = ode15s(@(t,s) fun(t,s)...

3 Monate ago | 1 answer | 0

Question

Defining a time varying function

I'd like to create a function that will output a value of a (e.g. a = 10) for time < t0 and value equal to b at time > t0. ...

3 Monate ago | 1 answer | 0

Question

Performing computation using contents stored in a table

Hi, I've the following table t = [1 2 3 4 5 6 7 8 9]'; h = [2 3 4 5 6 7 8 9 10]'; value = [1 2 1 2 1 2 1 2 1]'; tbl = table...

3 Monate ago | 1 answer | 0

Question

Sort the rows of a table based on row entries in two columns of another table

I am trying to sort the rows in one table (Tright) based on the order in which the rows are present in another table (Tleft) ...

3 Monate ago | 1 answer | 0

Answered

Solving transport equations in MATLAB

I just figured out pdepe can be used. Where the reaction and convection can be defined in the s term

Solving transport equations in MATLAB

I just figured out pdepe can be used. Where the reaction and convection can be defined in the s term

3 Monate ago | 0

| accepted

Question

Solving transport equations in MATLAB

Hi All, I am looking for a toolbox in MATLAB that can be used for solving convection diffusion reaction equations in 1D. Any...

3 Monate ago | 1 answer | 0