Respondida
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 ...

más de 13 años hace | 0

Respondida
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...

más de 13 años hace | 0

Respondida
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 ...

más de 13 años hace | 1

| aceptada

Respondida
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...

más de 13 años hace | 0

Respondida
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...

más de 13 años hace | 0

Respondida
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 ...

más de 13 años hace | 0

Respondida
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 = ...

más de 13 años hace | 0

Respondida
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...

más de 13 años hace | 0

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

más de 13 años hace | 0

Respondida
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...

más de 13 años hace | 0

| aceptada

Respondida
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...

más de 13 años hace | 0

Respondida
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...

más de 13 años hace | 0

Respondida
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...

más de 13 años hace | 0

Respondida
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...

más de 13 años hace | 0

Respondida
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...

más de 13 años hace | 0

Respondida
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

más de 13 años hace | 1

| aceptada

Respondida
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 ...

más de 13 años hace | 0

| aceptada

Respondida
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...

más de 13 años hace | 0

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

más de 13 años hace | 0

Respondida
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(...

más de 13 años hace | 0

Respondida
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...

más de 13 años hace | 0

Respondida
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...

más de 13 años hace | 0

Respondida
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

más de 13 años hace | 0

Respondida
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...

más de 13 años hace | 0

Respondida
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...

más de 13 años hace | 0

| aceptada

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

más de 13 años hace | 0

Respondida
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...

más de 13 años hace | 2

Respondida
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...

más de 13 años hace | 0

Respondida
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...

más de 13 años hace | 0

Respondida
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...

más de 13 años hace | 8

Cargar más