Respondida
Weibull 0 time failures
I assume you were trying to fit the data using something like parmhat = wblfit(data); I tried a few experiments and it d...

alrededor de 14 años hace | 0

| aceptada

Respondida
plotting energy as a function of angles
Sounds like you want a polar plot like <http://www.mathworks.com/help/techdoc/ref/polar.html polar> or <http://www.mathworks.com...

alrededor de 14 años hace | 0

Respondida
Awkward copy/paste question
If your two vectors are |v1| and |v2|, use: v2(isnan(v1)) = nan;

alrededor de 14 años hace | 2

| aceptada

Respondida
Counting zeros
In general, no. You can try doing it by counting sign changes, but there is no guarantee you'll catch all the answers. However, ...

alrededor de 14 años hace | 0

Respondida
Differentiation Of A Function.
You could do the following (I tack |num| onto the name to indicate it is numerical, not symbolic): Xnum = linspace(-1,1,128);...

alrededor de 14 años hace | 1

Respondida
lsqnonneg
x = C\d; *EDIT*: The least squares estimate for |x| is xhat = (C'*C)\(C'*d); You can estimate the error in the fit as fol...

alrededor de 14 años hace | 0

| aceptada

Respondida
General question about how do I loop this process?
It depends. If you want just line 2645, you could do the following: for ii=1:2644 fgetl(fid); end tline = fgetl(fid);...

alrededor de 14 años hace | 0

| aceptada

Respondida
error in plotting lyapunov exponent from time series
Is |lyap| supposed to be a variable or the function in the Control Toolbox? If the former, you can't index it with |t| and |x| b...

alrededor de 14 años hace | 0

| aceptada

Respondida
Multiple Answers From 'solve'
syms theta2 theta4 S=(-4.19*sin(theta2*pi/180)-5.166*sin(theta4*pi/180)+23.3*sin(82.99*pi/180))^2+(-4.19*cos(theta2*pi/180)-5....

alrededor de 14 años hace | 1

| aceptada

Respondida
How to use who within eval
This is a working example: clear x = zeros(10,1); y = x; save matlab.mat file_name='matlab.mat'; eval('file_length = length(w...

alrededor de 14 años hace | 0

| aceptada

Respondida
Calculating standard deviation from a confidence interval?
If the underlying distribution of the coefficients is normal, the 95% confidence interval is [mean-2*sigma,mean+2*sigma], so the...

alrededor de 14 años hace | 0

Respondida
Constraining a fitted curve
Tricky. Suppose that your fit is y = p(1)*x^3 + p(2)*x^2 + p(3)*x+p(4); You'll need to ensure that the first derivative y...

alrededor de 14 años hace | 0

Respondida
Getting divergence of a 3D pointcloud
You have worse than a formatting problem, if your point cloud is, as the name implies, an irregularly spaced collection of point...

alrededor de 14 años hace | 1

Respondida
Combining the data
[F(1:end-1)' F(2:end)']

alrededor de 14 años hace | 0

| aceptada

Respondida
Curve fitting with fails misarebly
I got a nice looking fit using <http://www.mathworks.com/help/toolbox/curvefit/cftool.html cftool> with the type of fit chosen t...

alrededor de 14 años hace | 0

Respondida
Accuracy issues when reading data from an input file
You can't do better than that because the decimal numbers are really represented by binary numbers, which can't represent a lot ...

alrededor de 14 años hace | 0

| aceptada

Respondida
make incorrect values as nan
Here is one way: I = find(diff(T)>1); T(I+1)=NaN; *EDIT*: And here is another using logical indexing: T([1 diff(T)>1]) = ...

alrededor de 14 años hace | 0

| aceptada

Respondida
accessing particular parts of an array
See <http://www.mathworks.com/company/newsletters/articles/Matrix-Indexing-in-MATLAB/matrix.html;jsessionid=6NB5PLjLyRkpY76DQ0nb...

alrededor de 14 años hace | 0

| aceptada

Respondida
Cell array summation
The slowdown seems to be caused by the use of cell data for indices into |ItemInfo|. Try this: Ys = sum([ItemInfo{UserDataC...

alrededor de 14 años hace | 1

| aceptada

Respondida
Cutting time using optimization instead of a potentially endless for loop ?
Certainly there is, but I'm not sure quite how to formulate it with the information given. It will look something like this. Put...

alrededor de 14 años hace | 0

Respondida
How to solve an integral?
If you get that warning from the Symbolic Math Toolbox, it may mean that there really is no symbolic solution. You could still i...

alrededor de 14 años hace | 1

| aceptada

Respondida
How to save struct datatype to disk
What exactly is the problem you are having? If you just want to save the whole structure, save('name.mat',structname) will ...

alrededor de 14 años hace | 0

Respondida
Why should I stay?
I always try to steer people asking installation questions to Mathworks Support. I'm guessing that they don't answer such quest...

alrededor de 14 años hace | 3

Respondida
fzero problem when doing integration using quadl.
You get those error messages because |quadl| expects a function that can input a vector but |fzero| can only solve for a scalar...

alrededor de 14 años hace | 0

| aceptada

Respondida
Quadrature method using vectors
One approach is the trapezoidal rule: vecsum = dot(diff(t),x(1:end-1)+x(2:end))/2; or, in loop form, vecsum = 0; for i=...

alrededor de 14 años hace | 1

Respondida
w - value
Here is a numerical solution. First, create the file |polyDet.m| with the following code in it: function out = polyDet(x) ...

alrededor de 14 años hace | 0

Respondida
Select the largest two numbers with their indices
Here is one approach that is efficient enough: n = 4; h=randn(n)+1i.*randn(n); h2 = sum(h.*conj(h),2); %sum of squares for ea...

alrededor de 14 años hace | 0

| aceptada

Respondida
xpos(i) in Polygonal domain
You could generate random points in a rectangle enclosing the polygon and then choose the points that lie inside using <http://w...

alrededor de 14 años hace | 0

| aceptada

Respondida
plot bar graph where each bar represents a range on the x axis?
I think what you're after is hist(x,xbins) where |x| is the data vector and |xbins| is a vector containing the center of eac...

alrededor de 14 años hace | 0

| aceptada

Respondida
Solving for an x value using ppval
It depends - if |x| and |y| are 1-1, you can just switch them in the above two lines. In general, however, there is probably mor...

alrededor de 14 años hace | 0

| aceptada

Cargar más