Answered
Function for filtering continuous time data
You need to filtrer time domain data or use your obtained filter coeff's [c, d]?

7 years ago | 1

Answered
Function for filtering continuous time data
I don't think here your computed [c,d] would be the coeff.s to use with filter() function. They are the coeff.s of the frequency...

7 years ago | 1

| accepted

Answered
referenced model dynamic path option?
Maybe set_param() would be an option in this case to link the model and ref. models: https://www.mathworks.com/help/simulink/ug/...

7 years ago | 0

Answered
Fastest way to insert array into another array
Use of size() can improve to certain extent: A(yStart:yEnd,xStart:xEnd) = true(size(yEnd-yStart+1,xEnd-xStart+1)); A(yStart...

7 years ago | 0

Answered
solve simultaneous non-linear equation system using fsolve
Your problem is not explcit. Some addtional expressions and/or input data are needed for mass transfer fluxes, gas partial prsss...

7 years ago | 0

Answered
Need help in solving coupled equations
Here is the completed code. Put your data instead of sample data used for W_net1, W_net2, m_net1, m_net2 clc; clearvars Nw...

7 years ago | 0

Answered
problem in plotting fft for set of samples
Here is the corrected code that computes fft and plots accordingly. N=3584; g=50; ts=.0002; fs=1/ts; t=[0:N-1]*ts; L = nu...

7 years ago | 0

| accepted

Answered
How to create an antisymmetric tensor
Hi, Here is one of the easy generators: clearvars N = 13; for ii = 1:N M(ii, :, :) = normrnd(0, 1, [N,N]); end

7 years ago | 0

Answered
How can i write a loop which calculates me the coefficients of a function with the method of least squares(fit)?
Hi, here is a simple way of doing it; clearvars, clc T = [5.6817; 5.7782; 5.8612; 5.9343; 6; 6.0597]; U_d = [1 ; 2 ; 3 ; 4 ...

7 years ago | 0

| accepted

Answered
Solving a non-linear least squares inverse problem
Hi, I would suggest to employ curve fit models: (linear least squares or non-linear least squares method) OPTs = fitoptions( ...

7 years ago | 0

Answered
Linear equations with symbolic matrix
Walter: your comments on vpasolve() are not relevant. pl., be kind and Run the code line by line and will understand how it comp...

7 years ago | 0

Answered
Linear equations with symbolic matrix
I don't see your point here. Why you are commenting all of these. In MATLAB, two types of commands that can be used interchangab...

7 years ago | 0

Answered
Linear equations with symbolic matrix
Here are some of the ways of solving linear systems: %% Given 13-by-13 system of linear equations clearvars; clc A = magic(13...

7 years ago | 0

Answered
Ending Program when it Hits a certain spot
We are talking only about his problem statement code and this problem as is, huh. We are not considering what iffs here. Thus, t...

7 years ago | 0

Answered
Ending Program when it Hits a certain spot
As I have understood your problem, this stops your simulation (where you got confused) as soon as : %this is the section i am...

7 years ago | 0

Answered
How to plot rows of matrix as pont in number of column dimensions
plot(1:n, U); % or a bit fancier but slower way for ii = 1:n plot(1:n, U(ii, 1:k)), hold all end

7 years ago | 0

Answered
How can I find the closest value in an array compared to a certain input in Simulink?
Hi, Are you using MATLAB Fcn block for your function file embedded in your Simulink model? Note that your variable name "di...

7 years ago | 0

Answered
Plot earth atmospheric model
Hi, Note how to use conditional operators [if... elseif.. else..end] within [for ... end] loop. The equations you have taken ...

7 years ago | 1

| accepted

Answered
FFT on data acquired from an accelerometer?
A second parameter N is the block size that is needed for fft to get better resolution of your spectrum analysis. From your coll...

7 years ago | 1

Answered
FFT on data acquired from an accelerometer?
Hi, First of all, why are you plotting FFT of your recorded accelerations' magnitude from x, y, z axes againt time signal? It ...

7 years ago | 1

| accepted

Answered
Nested Loop Script (Triangle)
Here is the complete answer to all parts of the assignment: %% clearvars; clc %% Part 1. k=1; for ii = 1 : 5 for jj ...

7 years ago | 0

| accepted

Answered
simulink ode error message
Hi, Maybe you can try to adjust the relative and absolute error tolerances via solver options or simset('reltol', value, 'absto...

7 years ago | 0

Answered
Quadratic Equation using Simulink
zeros(2,1) will not make any effect on the solver selection and thus, the solver has to be a fixed step. Otherwise, the model do...

7 years ago | 0

Answered
Plotting the time series
If you have a two column data, then to plot them as time series. E.g. X has two columns of data and time series: The time series...

7 years ago | 0

Answered
how to get the last row of data of a time series when I dont know how many rows that time series has
Hi, Of course it is possible. Here are the answers step - by - step. 1) if you have an array saved under variable name R, then...

7 years ago | 3

| accepted

Answered
Differential Equation Error: "Warning: Unable to find explicit solution"
Hi, Since you have the Step function, one of the most suitable Symbolic MATH toolbox functions for this type of ODEs is the L...

7 years ago | 0

Answered
Writing equations in MATLAB function vs using Simulink Blocks
Hi, One of the most common practice that I take very often to reduce the number of blocks in my Simulink models instead of [MAT...

7 years ago | 0

Answered
solving a quartic using simulink
Hi, Here are the steps to model a simple quadratic equation: % Step 1. Drag and drop three [Constant] blocks into your Mode...

7 years ago | 0

Answered
Quadratic Equation using Simulink
In this case, the solver has to be a Fixed Step and no problems will happen.

7 years ago | 0

Answered
how to get the last row of data of a time series when I dont know how many rows that time series has
Let's say you have saved your variable R data into MATLAB workspace, then to get the last row of R, this is the command: R(end,...

7 years ago | 0

Load more