Answered
immense difference between continous and discrete state space model
Do the responses of the open loop systems look similar? Just for your information, MATLAB's discrete integral and derivative ...

13 years ago | 0

Answered
data loaded within function shown as NaN
Your A.m function (or script) edits/changes the B.mat data. At some point it changes some of the numbers to NaN. If you don't po...

13 years ago | 0

Answered
Why all the plots from my program originate from (0,0).
The reason that usually simulink generated plots (out of scope) start from (0,0) is that the initial conditions of the Simulink ...

13 years ago | 1

| accepted

Answered
How to transfer an output of gui to a text file
open your GUI in GUIDE and double click on the push button. You need to write a callback for that pushbutton. As the property in...

13 years ago | 0

Answered
Need help selecting the max of array A, then selecting corresponding array B
At the end of your code add these lines: [maxPE,index] = max(pe); countryNameMAX = cn(index) maxPE and countryNameMAX...

13 years ago | 0

Answered
Simulink - PI Control Question - tuned output graph will not overshoot
Zoom in or out in your figure to see the oscillations. Also you may also need to change the total simulation time. Set it to ...

13 years ago | 0

Answered
Counting values above a threshold within a matrix.
you can run the below function for each of your numbers: function num_of_1s = no1(n) if n==0 num_of_1s = ...

13 years ago | 0

Answered
Solving systems of equations with "solve" function
Check the format of how to use "solve": <http://www.mathworks.com/help/symbolic/solve.html> you should choose a variable t...

13 years ago | 0

Answered
How to get rid of the zero decimal?
Type format short in the command window

13 years ago | 0

Answered
How can I change what parameters are visible in a masked block dialogue box?
When you are creating the mask, right click on the block and choose "edit MASK" then in the "Parameters" pane of the "Mask Edito...

13 years ago | 0

| accepted

Answered
Path radius from lat/long data
You must be using the geographical coordinate system. It is same as the spherical coordinates. Here is the transformation to Car...

13 years ago | 0

Answered
Path radius from lat/long data
It depends your data are in 2D (x-y plane) or 3D (xyz plane). There are equations to find the radius of curvature for each ca...

13 years ago | 0

Answered
Help with 'solve' function in MATLAB for numerical solution!
After you get the symbolic solution "d", you may need to say: num_sol = vpa(d) which computes d with numbers provided bef...

13 years ago | 0

Answered
How to write the B-spline basis function?
Your function called, bspline_basis() calls a nested function called, bspline_basis_recurrence() and the nested function again c...

13 years ago | 0

Answered
Solving ODE becomes unstable when using a decaying signal
I had same problem before. Try deriving the "dimensionless" form of your equations and solve those. usually if you are solvi...

13 years ago | 0

Answered
How to draw a rotated ellipse without any toolbox?
t = linspace(0,2*pi,1000); theta0 = pi/6; a=2; b=1; x = a*sin(t+theta0); y = b*cos(t); plot(x,y) axis equal

13 years ago | 1

| accepted

Answered
Is there any easy way to solve matrix differential equation?
The analytical solution to the problem of dp/dt = ip is p(t) = C exp(it) where C is a constant matrix same size as p used ...

13 years ago | 0

| accepted

Answered
How to save specified data from a matrix?
if your matrix m is 100 by 1, you can do this: m(m<0.2) gives you a new matrix that is smaller or equal size to the orig...

13 years ago | 0

Answered
How to close a file outside of matlab?
Can fclose() close your file?

13 years ago | 0

Answered
error when the input is zero
If you set G = 0, then IL will be evaluated as 0. When IL = 0, then h = 0 and I = 0:h:IL which is I = []. And N = length(...

13 years ago | 0

Answered
How can I do to put on simulink a differential equation system like the one below?
what is da/dz? you mean derivative of a function a with respect to a space variable z? If this is the case then it is a PD...

13 years ago | 0

Answered
Which solver to use? I cannot get an answer, though I know there is one.
It seems that in yoru problem you ahve numerical value for all the variables and want to find L. To do so, I don't recommen...

13 years ago | 0

Answered
how to throw out certain intervals.
Like this: for j=1:length(X)-1 if y>X(j) && y<X(j+1) % do ... end end

13 years ago | 0

Answered
Accessing cell array via factor/index
You need to use strcmp() to compare strings: for j=1:size(data,2) if strcmp(data{j,3},'fs') % do some stuff here for this...

13 years ago | 0

Answered
how to detect smile of a person ??
First you got to detect the line between the lips. After that you need to compute the arc angle of that line if it is caved towa...

13 years ago | 0

| accepted

Answered
trying to parametrize code for 'solve' and 'syms' command
Use Z = trapz(X,Y)

13 years ago | 0

Answered
Solving an equation containing sine and cosine
A*cos(x)+B/sin(x)=C multiply both sides by sin(x) to get: A * sin(x)*cos(x) + B = C * sin(x) now use the following rel...

13 years ago | 2

Answered
Why does this program return complex numbers?
I think the complex numbers come from the function log used in your code at line 0064. Note that the input of log function sh...

13 years ago | 0

Answered
Changing a function to take an input of cells rather than a matrix
All you need to do is to change all the occurances of data(.,.) in your function to data{.,.}. This way wherever you are accessi...

13 years ago | 0

Answered
Round to nearest odd integer
Not that I know of.. but you can use this: function y=fun(x) y = 2*floor(x/2)+1; end depending on what you want to do with t...

13 years ago | 8

Load more