Question

M-file created in previous version, not working in advanced version.

Hi, The m-file and Simulink model which I created in R2012b version is not working suddenly in R2013a version. Actually R2012...

oltre 6 anni ago | 2 answers | 0

Question

how to run the simulink block four times ie., for four different conditions using for loop?

Hi, I need to run my Simulink model for four times as I have assigned four conditions. Please find the code below. k_A_...

oltre 6 anni ago | 0 answers | 0

Question

How to perform element-wise matrix multiplication in simulink?

Hi, I have modelled the equations below in Simulink and I wanted to check them through simulation. But when modelled in Simul...

oltre 6 anni ago | 1 answer | 0

Question

error using plot:Vectors must be the same lengths

I get this error in the plot line. V=20; t_sim=0.02; sample_distance=0.2; ts=sample_distance/V; step_time=1...

oltre 6 anni ago | 1 answer | 0

Question

Derivative input 2 of '... /Integrator2' at time 0.012988383999014474 is Inf or NaN. Stopping simulation....

Hi, Derivative input 2 of 'Single_wheelset_susp_mass/Lateral wheelset_inertia /Integrator2' at time 0.012988383999014474 i...

oltre 6 anni ago | 0 answers | 0

Question

How to solve division by zero error ?

Hi, I have designed a model in Simulink and when I run the program it gives a warning and an error, Warning: Division by ...

oltre 6 anni ago | 1 answer | 1

Question

To plot the model error against time

Anyone please help me plot the model error against time in the subplot(212) V=20; t_sim=30; ...

oltre 6 anni ago | 1 answer | 0

Question

How to assign the difference of system input and the states in the input matrix?

Hi, I'm quite confused on how to assign the input matrix which is a difference of two numbers.Well, they aren't really numbers,...

oltre 6 anni ago | 1 answer | 0

Question

eigenvalue analysis of a state space model

Hi, I'm trying to do an eigenvalue analysis with the information from the pole-zero plot, which is as below It is ob...

oltre 6 anni ago | 1 answer | 0

Question

How to select corresponding value from an array?

When I use the following expression for calculating theta I get a value in the range specified for theta below (i.e., 0.5 to 90)...

oltre 6 anni ago | 1 answer | 0

Question

How to choose a value from the plot?

plot(contact_geometry.y-d,contact_geometry.r_L) Could someone please tell me, is it possible to do coding in such a way t...

oltre 6 anni ago | 1 answer | 0

Question

How to plot multiple points on the same graph with changing values of parameters for each iteration?

Hi, I need to plot s_x vs. f_x where f_x keeps changing for each iteration . Hence f_x must be plotted against s_x for every...

oltre 6 anni ago | 1 answer | 0

Question

How to group the corresponding elements of an array?

Hi, I'm calculating the value of a parameter f_x whose value changes according to the following conditions. I haven't s...

oltre 6 anni ago | 2 answers | 0

Question

How to plot the five ellipses in the same figure?

Here is my code, where when xi_a takes a new value from xi for each iteration, the semi-axes of my ellipse changes. Now my q...

oltre 6 anni ago | 2 answers | 0

Question

Colour mismatch between plot and legend

I don't know why the legend and plots don't match. I get the legend colours as defined below but the plot colours are all blue. ...

oltre 6 anni ago | 1 answer | 0

Question

What should be modified inside the for loop?

For each value of f_x_loop, I need x_a to take one of the five values from s_x_index for each iteration instead of one value for...

oltre 6 anni ago | 1 answer | 0

Question

how to save plots so that they are in the same graph for different conditions

Hi, I need to generate plots for four different conditions. So I will be having four curves on the whole. Now I get a plot fo...

oltre 6 anni ago | 1 answer | 0

Question

Attempted to access colors(6); index out of bounds because numel(colors)=5

Hi, I tried executing this loop, colors = ['m';'y';'b';'g';'c']; loop_ind = 1; for k1 = 1:5 figure(4); linespec ...

circa 7 anni ago | 2 answers | 0

Question

The colors displayed in the legend do not match the plot colors.

This is my code, colors = ['r';'m';'b';'g';'c']; symbols = ['*-';'+-';'*-';'+-';'*-']; for k1 = 1:5 colsym = [colors...

circa 7 anni ago | 1 answer | 0

Question

Plotting for particular values of x-coordinate

load('wheel_rail_AW.mat') S = contact_geometry x_new=S.y; y_new =S.r_R; xi = min(x_new) + (max(x_new)-min(x_new))...

circa 7 anni ago | 2 answers | 0

Question

How to choose a random value from an array?

Hi, I have an array of values and I need to frame an expression such that it chooses the value from the array automatically i...

circa 7 anni ago | 2 answers | 1

Question

How to plot multiple iterations on the same axes?

Hi, I'm trying to plot the below. In x-axis, I have s_x_index=[0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.10] ...

circa 7 anni ago | 2 answers | 0

Question

What should be the coding for the problem mentioned?

Hi, I have an input y whose value keeps changing for different iteration and y is being fed to two parameters namely r and R....

circa 7 anni ago | 1 answer | 0

Question

An expression for choosing a value from the array automatically

Hi, I have an array of values and I need to frame an expression such that it chooses the value from the array automatically i...

circa 7 anni ago | 1 answer | 1

Question

To plot an ellipse

Hi, I have got the semi axes, with that how to plot an ellipse in matlab. I have tried using the function 'pdeellip', but it ...

circa 7 anni ago | 2 answers | 0

Question

How to open a .mat file in Matlab

Hi, I'm trying to open a .mat file in Matlab, but am unble to do it. I followed the instructions from this link below, <h...

circa 7 anni ago | 3 answers | 1

Question

How to get the damping ratio of an underdamped response

I have got a step response which seems underdamped and I have also used the 'damp' function to retrieve the values of damping ra...

circa 7 anni ago | 1 answer | 0

Question

Characteristics of a time response plot

Hi, I'm trying to see the characteristics of the plot, which we normally do by right clicking on the plot. But if I right cl...

circa 7 anni ago | 1 answer | 0

Question

Characteristics of a step response plot

Hi, I tried getting the rise time and %overshoot from a step response by right clicking and viewing the characteristics. But ...

circa 7 anni ago | 1 answer | 1

Question

What does the function 'norm' do?

Please tell me what does the 2(in bold) in the below expression mean? residsumsq = norm(y-yhat, *2* )^2; Also, Is the norm...

circa 7 anni ago | 3 answers | 0