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

etwa 14 Jahre vor | 0

| akzeptiert

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

etwa 14 Jahre vor | 0

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

etwa 14 Jahre vor | 2

| akzeptiert

Beantwortet
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, ...

etwa 14 Jahre vor | 0

Beantwortet
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);...

etwa 14 Jahre vor | 1

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

etwa 14 Jahre vor | 0

| akzeptiert

Beantwortet
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);...

etwa 14 Jahre vor | 0

| akzeptiert

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

etwa 14 Jahre vor | 0

| akzeptiert

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

etwa 14 Jahre vor | 1

| akzeptiert

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

etwa 14 Jahre vor | 0

| akzeptiert

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

etwa 14 Jahre vor | 0

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

etwa 14 Jahre vor | 0

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

etwa 14 Jahre vor | 1

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

etwa 14 Jahre vor | 0

| akzeptiert

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

etwa 14 Jahre vor | 0

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

etwa 14 Jahre vor | 0

| akzeptiert

Beantwortet
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]) = ...

etwa 14 Jahre vor | 0

| akzeptiert

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

etwa 14 Jahre vor | 0

| akzeptiert

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

etwa 14 Jahre vor | 1

| akzeptiert

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

etwa 14 Jahre vor | 0

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

etwa 14 Jahre vor | 1

| akzeptiert

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

etwa 14 Jahre vor | 0

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

etwa 14 Jahre vor | 3

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

etwa 14 Jahre vor | 0

| akzeptiert

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

etwa 14 Jahre vor | 1

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

etwa 14 Jahre vor | 0

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

etwa 14 Jahre vor | 0

| akzeptiert

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

etwa 14 Jahre vor | 0

| akzeptiert

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

etwa 14 Jahre vor | 0

| akzeptiert

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

etwa 14 Jahre vor | 0

| akzeptiert

Mehr laden