Community Profile

photo

Raj


195 total contributions since 2019

Contact

Raj's Badges

  • 6 Month Streak
  • Knowledgeable Level 3
  • Thankful Level 1
  • Revival Level 2
  • Solver
  • First Answer

View details...

Contributions in
View by

Answered
Could anyone help me to solve the issue.
A=[1.6512 1.6149 1.5829 1.5546 1.5298 1.1498 1.1334 1.1191 1.1066 1.0957 1.0862 1.0779 1.070...

2 days ago | 0

Answered
Comparing a value against a set of values
A=rand(1,1,n) % Define your matrix here B=nonzeros(A); if isempty(B) %%Do nothing else %%Run command here end

5 days ago | 0

Answered
could anyone help me to solve the issue in the following code
"Could anyone please help me on it" - You have not exactly mentioned what help are you looking for. Your error message is self e...

5 days ago | 0

| accepted

Answered
Diffrent results using tf(ss(A,B,C,D)) or C*inv(s*I-A)*B+D
The results are not different. They are same. Minor differences can be due to numerical/computational tolerances and accuracy. A...

8 days ago | 0

| accepted

Answered
Transfer function of the highly distorted system; impact hammer testing and frequency response of the system
Not sure why you took the trouble of posting so much details. From what I understand, the one line question is that you have got...

11 days ago | 0

Answered
Bode plot from transfer function looks wrong
"What is wrong with my MATLAB code?" - Absolutely nothing! Your Bode plot 'x' axis in in rad/sec and the online graph is in Hz...

11 days ago | 0

| accepted

Answered
How to I ensure that a triggered subsystem is run after the supersystem in Simulink?
You can do that by assigning higher relative priority to the supersystem. See below links for details: https://www.mathworks.co...

11 days ago | 0

| accepted

Answered
transfer function plot problem
I don't think you need to use 'zp2tf' and then 'tf' to get your transfer function. You can directly use: sys=zpk(z,p,k) bode(s...

11 days ago | 0

Answered
nonlinear bode plot to linear approximation bode plot
Have a look here: https://www.mathworks.com/help/ident/examples/frequency-domain-identification-estimating-models-using-frequen...

12 days ago | 0

| accepted

Answered
Why isn't possible to create a documention directly from the control system toolbox
Actually you can print you figures as PDF files if that's what you are asking for. See the answer posted here: https://in.mathw...

26 days ago | 0

Answered
Replace one NAN with zero in a row vector without a loop
A(isnan(A)) = 0; % replaces NAN elements of A matrix by Zero.

27 days ago | 0

| accepted

Answered
See the figure.
So I understand you want your Y axis to be in reverse direction (decreasing from bottom to top) so that your graph comes out in ...

1 month ago | 0

| accepted

Answered
Root locus shows less overshoot than step
The overshoot value indicated on a particular Pole in rlocus or pzmap plot is effectively the overshoot 'contributed' by that pa...

1 month ago | 0

Answered
Initializing a value at the beginning of a Feedback loop in SIMULINK
Instead of initializing the value of 'x' inside MATLAB function, try the following: 1) Instead of directly feeding x1 at x (whi...

2 months ago | 0

| accepted

Answered
Help With For Loops in Plotting Problem
temp=1; t= linspace(0,15,100); Nat_fr=2.5; %Natural Frequency for Zeta=0.2:0.2:0.8 Beta (temp,1)= sqrt...

2 months ago | 1

| accepted

Answered
Hi there, I am trying to write a code on composite bars for n cross-sections, could someone help me with a simple code.
Use this: o = 'Enter the number of cross-sections: '; n = input(o); prompt = 'Enter the load in N: '; F = input(prompt); A=...

2 months ago | 1

| accepted

Answered
Problem in writing MATLAB code of Simulink model (state space)
"I want to write my simulink model into state space model" - Your simulink model is pretty straightforward and already in standa...

2 months ago | 0

Answered
how can we obtain the desired characteristic equation of a system?
"How the desired pole locations can be obtained for my particular system" - Desired pole locations are obtained from desired sys...

2 months ago | 0

Answered
I cant get fprintf to work
Since you have not shared your mat file, I am assuming a,b,c,d are numbers. In that case, why are you using %s (which is for str...

2 months ago | 0

Answered
How to plot only second pole of state space matrix with 20 eigenvalues?
Any specific reason you want to plot it on a 'pzmap'? I mean, If you just want to see the trend/evolution of the second Eigen va...

2 months ago | 0

| accepted

Answered
How to import data for multiple files using for loop?
Here is a portion of code I use to read multiple files in cases like this: for r=1:6 % Number of files myfilename= sprintf('%i...

2 months ago | 0

| accepted

Solved


Flip the vector from right to left
Flip the vector from right to left. Examples x=[1:5], then y=[5 4 3 2 1] x=[1 4 6], then y=[6 4 1]; Request not ...

2 months ago

Solved


Doubling elements in a vector
Given the vector A, return B in which all numbers in A are doubling. So for: A = [ 1 5 8 ] then B = [ 1 1 5 ...

2 months ago

Solved


Find max
Find the maximum value of a given vector or matrix.

2 months ago

Solved


Get the length of a given vector
Given a vector x, the output y should equal the length of x.

2 months ago

Solved


Arrange Vector in descending order
If x=[0,3,4,2,1] then y=[4,3,2,1,0]

2 months ago

Solved


Select every other element of a vector
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...

2 months ago

Solved


Find the sum of all the numbers of the input vector
Find the sum of all the numbers of the input vector x. Examples: Input x = [1 2 3 5] Output y is 11 Input x ...

2 months ago

Answered
how to convert the fraction part into intger?
Use ceil(K) or floor(K) depending on how you want to round off the fractions. or int8(K) or int16(K) or int32(K) ...

2 months ago | 1

Answered
Element-wise Complex Magnitude Calculation
Why don't you just put it in a loop like this: A = rand(5,1) + i*rand(5,1); % Assume this is your array B=zeros(length(A),1); ...

2 months ago | 0

Load more