Answered
How can I access the transfer function in time-constant-format using zpk transfer functions?
z{1}, p{1}, k % show the values in the command window.

7 years ago | 0

Answered
How Matlab calculate MARGIN (Problem with system with time-delay)
This is a sampling time related issue. Solution is to reduce a sampling time size.

7 years ago | 0

Answered
Create custom bode plot
In this case, in my understanding - not to use ltiplot(). Compute the values of Bode and plot the computed values by employing s...

7 years ago | 0

Answered
What is T_e in stepper motor equation?
That is a motor torque.

7 years ago | 0

Answered
reorganize plot for runge kutta
Hi, In your code there are several flaws: (1) In your RK code: y(0) = 0.2 and in validation ode45 (validation part) y0 = 0....

7 years ago | 0

Answered
Error using - Matrix dimensions must agree. Error in Eigenfaces (line 14) t=double(z(i,:))-m;
Hi, Here is the corrected answer for MATLAB 2013 version: function [ ] = Eigenfaces( ) z=[]; ta=[]; for ii=1:100 s...

7 years ago | 0

Answered
Modelling Integrator with Transfer Fcn Block
Hi, That would be helpful if you post system formulation (transfer function) of your feedback system. It looks like you are n...

7 years ago | 0

Answered
Error using * Inner matrix dimensions must agree.
Hi, The problem is resolved. I have picked up my old pc with MATLAB 2013b and managed to generate your problem. The problem w...

7 years ago | 1

Answered
How to color between two step responses
Simple solution is this: Sys1 = tf([1 2], [1 1 300 250]); Sys2 = tf([1 2], [1 5 300 250]); t = 0:.01:50; figure step(Sys1...

7 years ago | 0

Answered
Instability of identified model in time domain with the step function
Can you post your data out_sweep to play with your code and come up with a solution to your problem?

7 years ago | 0

| accepted

Answered
Using feedback() with time delay
Hi Robert, Your code is just fine except for one tiny but a curicial point that is internally built-in solver step size relat...

7 years ago | 1

| accepted

Answered
Error using * Inner matrix dimensions must agree.
Hi, I could not find any problem with your corrected for a few .jpg images (created) to process that I've played with. Ther...

7 years ago | 1

Answered
how to use delimiter and for loop together to form a matrix in matlab?
Hi, Here is the solutuion script: clear variables N_sets = 10; for ii = 1:N_sets Name = strcat(int2str(ii), '.txt');...

7 years ago | 0

Answered
how to use delimiter and for loop together to form a matrix in matlab?
Yes, it is feasible and relatively easy only if all of your files - ASCII formatted data files are well and identically formatte...

7 years ago | 0

Answered
Creating a piecewise sine function having different frequency components
Hi, If I've understood your question correctly, this is what you are trying to create: fs = 1e3; % Sampling frequency [...

7 years ago | 0

Answered
How can I fix this error message: Unable to perform assignment because the left and right sides have a different number of elements?
Hi, As stated by Walter, it is necessary to have a look at your function file: intersection1sph2 without it - it is just a gu...

7 years ago | 0

Answered
A(B>TH) = 1 does not transform correctly via Matlab coder
Can you show what data you are generating and selecting/indexing out? and your code. There might be several issues.

7 years ago | 0

Answered
storing a multiple values for single model
One of the possible solutions is to employ sim() and run your simulink model for 4 cases within a loop [for .. end] from MATLAB,...

7 years ago | 0

| accepted

Answered
Array indices must be positive integers or logical values. How to solve?
a1 = 0.22; a2 = a1; a3 = a2; gamma1 = .194; gamma2 = gamma1; gamma3 = gamma1; sigma1 =.1; sigma2=sigma1; sigma3 = sigma1; ...

7 years ago | 0

Answered
Error using * Inner matrix dimensions must agree.
Hi, There is one very tiny but a really crucial point missed with the index of z(). Here is corrected part: ... z=[z te...

7 years ago | 1

| accepted

Answered
plot a delta function
use stem() instead of plot() and you'll get it as shown in your image. n=-10:10; % E.g. use any space N1 = 2; % E.g. set up ...

7 years ago | 1

| accepted

Answered
plot a delta function
Hi, here is one of the possible solutions: n=-10:10; % E.g. use any space N1 = 2; % E.g. set up at any value x = zeros(s...

7 years ago | 1

Answered
how to plot this function
Hi, Here is the full spectrum calculation: n = -5:1:5; x=1*(n>=-2 & n<=2); L = length(n); Fs = 1; Nblock = 128; % Block s...

7 years ago | 1

Answered
Basins of attraction and Newtons Method.
Hi, You are trying to plot the series of Xr1, Xr2, Xr3 without really computing to their values. Because your error toleranc...

7 years ago | 1

Answered
Function functions of fixed-point iteration
Hi, You were almost there and just overlooked at one point with: g=diff(fun); that requires symbolic differentiaion w.r.t the...

7 years ago | 1

| accepted

Answered
How to insert a new vector to matrix in every iteration?
This one works: x = [1 1 2 2 3 3]; y= [4 5 4 5 4 5]; z = zeros(2, numel(x)); for ii=1:numel(x)...

7 years ago | 0

Answered
make matrix by using vectors created by loop
Hi, % Here is the complete solution that saves all computed roots of the linear system w.r.t. r(ii) b =[2,3,5]';r = -1:0.1:1; ...

7 years ago | 0

Answered
In simulink, how to output the data from scope to workspace directly rather than output data as an attribute in a variable
It is available in the Scope of 2019a, just go under Parameters--> drop-down options... Good luck.

7 years ago | 0

Answered
remove zeros from sinc function
clearvars; close all Fs=42;Ts=1/Fs; t=-1:Ts:1; f=5; y=sinc(t*f)./(1-5*t/(0.9)*pi); figure; plot(t,y), xlabel('t'), ylabel(...

7 years ago | 0

| accepted

Answered
how to plot this function
n = -5:1:5; x=1*(n>=-2 & n<=2)+0*(n<-2 & n>2); L = length(n); Fs = 1; Nblock = 128; % Block size Y = fft(x, Nblock)/L; f =...

7 years ago | 1

Load more