Question

Efficient algorithm to compute only the most probable sequences of a random variable out of all possible sequences

I'm looking for a better way to compute the possible sequences of a random variable whos value at time k is given by. x(k) = 1 ...

meer dan een jaar ago | 3 answers | 1

Question

Waterfall plot not showing correctly

I think this is an undesirable feature of the waterfall plot function and I'm posting it here so that others don't spend as long...

meer dan een jaar ago | 0 answers | 0

Question

Special characters in m-file comments are being removed/replaced

I've noticed that special charactes such as 'Γ' and '│' that I sometimes use in comments in m-files are being removed: % Comput...

meer dan een jaar ago | 0 answers | 0

Answered

How to add variable names for each column when using array2table

I wrote a function to do it: function T = array2table_with_name(X, label, sep) % T = array2table_with_name(X, label) converts ...

How to add variable names for each column when using array2table

I wrote a function to do it: function T = array2table_with_name(X, label, sep) % T = array2table_with_name(X, label) converts ...

meer dan een jaar ago | 0

Question

Best way to generate an array of all possible integer numbers for a given base and number of digits

I want to prepare an array that contains all combinations in rows of possible sequences represented by an d-digit number of base...

meer dan een jaar ago | 1 answer | 0

Answered

CRL:"Simulation Target IPP BLAS" cannot be found in the registry

Problem was solved for me on Mac OS X by closing MATLAB and all Simulink files and restarting.

CRL:"Simulation Target IPP BLAS" cannot be found in the registry

Problem was solved for me on Mac OS X by closing MATLAB and all Simulink files and restarting.

meer dan een jaar ago | 1

Answered

How to construct a cell array containing a power series of a matrix

Here is a solution using cellfun: results = cellfun(@(i) A^i, num2cell(1:n), 'UniformOutput', false)

How to construct a cell array containing a power series of a matrix

Here is a solution using cellfun: results = cellfun(@(i) A^i, num2cell(1:n), 'UniformOutput', false)

meer dan een jaar ago | 0

Question

How to construct a cell array containing a power series of a matrix

I want to compute the following power series of a square matrix A (as a preliminary step to constructing a larger matrix using t...

meer dan een jaar ago | 1 answer | 0

Answered

Bypassing the internal (Linear) observer in MPC toolbox 3

Might be 10 years too late but I had this question and it looks like you can set the following check box below in the Simulink M...

Bypassing the internal (Linear) observer in MPC toolbox 3

Might be 10 years too late but I had this question and it looks like you can set the following check box below in the Simulink M...

meer dan een jaar ago | 0

Answered

How to deal with Extended Kalman Filter in Simulink when my state transition function is given in continuous time form?

Check out the examples in the documentation here: https://www.mathworks.com/help/control/ref/extendedkalmanfilter.html The exa...

How to deal with Extended Kalman Filter in Simulink when my state transition function is given in continuous time form?

Check out the examples in the documentation here: https://www.mathworks.com/help/control/ref/extendedkalmanfilter.html The exa...

meer dan een jaar ago | 0

Answered

Simulink: There is no solver registered as 14.

I don't know exactly what caused this error but I found I could run the msfcn_limintm.m example from the S-functions in the docu...

Simulink: There is no solver registered as 14.

I don't know exactly what caused this error but I found I could run the msfcn_limintm.m example from the S-functions in the docu...

meer dan een jaar ago | 0

Answered

How are structs handled when passed to a function?

Seems that MATLAB makes a complete copy of a struct when it is passed to a function if any element is changed by the function (s...

How are structs handled when passed to a function?

Seems that MATLAB makes a complete copy of a struct when it is passed to a function if any element is changed by the function (s...

meer dan een jaar ago | 0

Question

Unable to detect datetime or duration data using readtimetable with a seconds index

Here is a toy example of my problem: % Create a timetable with a seconds index data = timetable(seconds(1:3)', randn(3,1), ran...

meer dan een jaar ago | 1 answer | 2

Answered

Find the First element that satisfies a condition

If you only want to find the locations in A where the condition is true and then index those values you can use find: >> elemen...

Find the First element that satisfies a condition

If you only want to find the locations in A where the condition is true and then index those values you can use find: >> elemen...

meer dan een jaar ago | 0

Answered

What is the 'MeasurementFcn1Inputs' input on the Extended Kalman Filter Simulink block?

I found the problem. I was using the same function (robot_outputs) for the NLMPC and the EKF: function y = robot_outputs(x,u) ...

What is the 'MeasurementFcn1Inputs' input on the Extended Kalman Filter Simulink block?

I found the problem. I was using the same function (robot_outputs) for the NLMPC and the EKF: function y = robot_outputs(x,u) ...

meer dan een jaar ago | 0

| accepted

Question

What is the 'MeasurementFcn1Inputs' input on the Extended Kalman Filter Simulink block?

I'm trying to implement an Extended Kalman Filter Simulink block similar to the example shown for the inverted pendulum here whi...

meer dan een jaar ago | 1 answer | 0

Answered

Get a subset of columns from a timeseries object as a timeseries

Here is my answer to illustrates the timetables solution proposed by @dpb in the comments above. u = timetable(seconds(t),u1,u2...

Get a subset of columns from a timeseries object as a timeseries

Here is my answer to illustrates the timetables solution proposed by @dpb in the comments above. u = timetable(seconds(t),u1,u2...

meer dan een jaar ago | 0

Question

Get a subset of columns from a timeseries object as a timeseries

I have a timeseries containing data for 4 variables: Ts = 0.2; nT = 50; t = Ts*(0:nT-1)'; u1 = 50*idinput(nT); u2 = 50*idinp...

meer dan een jaar ago | 2 answers | 0

Question

How to insert the 'double R' symbol in LiveScript (space of real numbers)

Anyone know how to get this symbol in the LiveScript equation editor? MS Equation editor equivalent: \doubleR Latex: $\mat...

meer dan een jaar ago | 1 answer | 0

Question

Is it possible to solve multiple linear systems of equations in parallel with one matrix operation?

I'm wondering if there's a way to do the following calculations in one go (i.e. without the for loop). V = nan([na nv]); for i...

meer dan een jaar ago | 1 answer | 0

Question

How to replace elements of a cell array using a containers.Map

I have a cell array of VariableNames that Matlab created when reading a csv file. I want to change them to my own choice of nam...

meer dan een jaar ago | 2 answers | 0

Answered

Solve equation that has a complex subexpression

I just discovered that you can also solve this numerically with vpasolve: syms s omega G(s) assume(omega > 0) G(s) = 10/(s*(1...

Solve equation that has a complex subexpression

I just discovered that you can also solve this numerically with vpasolve: syms s omega G(s) assume(omega > 0) G(s) = 10/(s*(1...

bijna 2 jaar ago | 0

Question

How to find the 'troughs' using peak finder in Simulink Scope

I've been using the Peak Finder Measurements tool in the Simulink scope output to find the peak of the system responses. But if...

bijna 2 jaar ago | 1 answer | 0

Answered

How to check if two transfer functions are the same?

Based on comments from Paul above I offer these functions as a solution: function c = is_equal_tf(G1,G2) c = almost_zero_s...

How to check if two transfer functions are the same?

Based on comments from Paul above I offer these functions as a solution: function c = is_equal_tf(G1,G2) c = almost_zero_s...

bijna 2 jaar ago | 0

Question

Basic math operations on contents of a cell array

Is there any reason why basic math operations don't work with cell arrays? Seems to me it would extremely useful and efficient ...

bijna 2 jaar ago | 2 answers | 0

Question

Best way to resample the output of a Simulink simulation with variable time step into a signal with a fixed sample time

I have a simulation model that runs with a variable timestep: (I don't want to change this) For the purpose of system identi...

bijna 2 jaar ago | 1 answer | 0

Question

How to turn off text interpreter when plotting timeseries objects

I am plotting timeseries objects using plot. My variable names include underscores (e.g. 'ABC_DEF') and I do not want these int...

bijna 2 jaar ago | 2 answers | 0

Question

Evaluate function over a mesh grid (without for loops)

Is there a way to evaluate a function that takes an [x, y] vector as input over a grid of points? Here is the function I want t...

bijna 2 jaar ago | 2 answers | 0

Answered

Why do I get the warning "MATLAB:dispatcher:InexactCaseMatch Cannot find an exact (case-sensitive) match for 'startup'" on MATLAB startup?

For me the problem started after I added a path to a module that I am using for a course. The scripts in this module are launch...

Why do I get the warning "MATLAB:dispatcher:InexactCaseMatch Cannot find an exact (case-sensitive) match for 'startup'" on MATLAB startup?

For me the problem started after I added a path to a module that I am using for a course. The scripts in this module are launch...

ongeveer 2 jaar ago | 0

Answered

Why are symbolic expressions being rounded?

Mathworks technical support have diagnosed the problem. Don't know what caused it originally but the 'FloatingPointOutput' sett...

Why are symbolic expressions being rounded?

Mathworks technical support have diagnosed the problem. Don't know what caused it originally but the 'FloatingPointOutput' sett...

ongeveer 2 jaar ago | 0

| accepted