Réponse apportée
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...

plus de 14 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 14 ans il y a | 0

Réponse apportée
Awkward copy/paste question
If your two vectors are |v1| and |v2|, use: v2(isnan(v1)) = nan;

plus de 14 ans il y a | 2

| A accepté

Réponse apportée
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, ...

plus de 14 ans il y a | 0

Réponse apportée
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);...

plus de 14 ans il y a | 1

Réponse apportée
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...

plus de 14 ans il y a | 0

| A accepté

Réponse apportée
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);...

plus de 14 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 14 ans il y a | 0

| A accepté

Réponse apportée
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....

plus de 14 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 14 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 14 ans il y a | 0

Réponse apportée
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...

plus de 14 ans il y a | 0

Réponse apportée
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...

plus de 14 ans il y a | 1

Réponse apportée
Combining the data
[F(1:end-1)' F(2:end)']

plus de 14 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 14 ans il y a | 0

Réponse apportée
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 ...

plus de 14 ans il y a | 0

| A accepté

Réponse apportée
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]) = ...

plus de 14 ans il y a | 0

| A accepté

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

plus de 14 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 14 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 14 ans il y a | 0

Réponse apportée
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...

plus de 14 ans il y a | 1

| A accepté

Réponse apportée
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 ...

plus de 14 ans il y a | 0

Réponse apportée
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...

plus de 14 ans il y a | 3

Réponse apportée
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...

plus de 14 ans il y a | 0

| A accepté

Réponse apportée
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=...

plus de 14 ans il y a | 1

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

plus de 14 ans il y a | 0

Réponse apportée
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...

plus de 14 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 14 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 14 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 14 ans il y a | 0

| A accepté

Charger plus