Answered
How to SUM certain values of vector without using any loop?
p = sum(y(2*(2:m+1) - 1)); You seem to be uncomfortable with the expression 2:m+1. Note that + has a higher precedence in the o...

8 years ago | 2

| accepted

Answered
How to calculate exp() of a small number:
This is not at all surprising. For VERY small values of L, over a tiny interval, exp is extremely well represented by a straight...

8 years ago | 0

Answered
Gauss Curve Point of Inflection
Find the EXACT inflection point? Sorry, but you cannot do so. At best, you can find an approximate inflection point, and that ...

8 years ago | 1

| accepted

Answered
I am writing an FEM code for a curved box girder bridge and getting an error..Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 9.359430e-32. > In Dec14 (line 579)
The trick with FEM is to recognize there are several potential reasons for a singular matrix. The obvious one is you might have ...

8 years ago | 0

Answered
how to decompose a polynomial
It is not a polynomial, a multinomial is a better description. I'm not even sure that what you ask is well-posed, in the sense t...

8 years ago | 0

Answered
Making My Own Simpson's Rule Function
Your code will certainly fail here: for i = 1:n/2 q1 = q1 + f(x((2*i-2))); end What happens when i==1? We can see that 2...

8 years ago | 0

Answered
How to write a series expansion without rounding
You ask about finding the sum of the series with generic term 1/2^n. So then why are you summing terms of the form 1/n^n? As w...

8 years ago | 1

| accepted

Answered
How can I normalize 3D points to be between 0;1 without changing the distribution ?
Sorry, but as soon as you do any normailzation at all, you ARE changing the distribution. It may be that you are not changing t...

8 years ago | 1

| accepted

Answered
how to fit implicit function to data
I'll just throw it into the curve fitting toolbox, although any tool would have sufficed for a first try. You should recognize t...

8 years ago | 1

| accepted

Answered
How do I increase precision in my variables
You cannot increase the precision of a variable. Double is it. Unless you want to DECREASE precision, and then you can go to a s...

8 years ago | 1

Answered
Using Matlab to find numerically all roots and plotting them
There are infinitely many solutions. So wanting to find all of them might take some time. But solve can easily find some princip...

8 years ago | 1

Answered
central limit theorem random process
What would this do? rand(1,N) So then, what would this do, if I appended a round on top? I.e., round(rand(1,N)) What possibl...

8 years ago | 0

Answered
Finding the pseudo inverse of a matrix
Perhaps I need to explain it differently, since you don't want to accept that there are some matrices that completely lack an in...

8 years ago | 7

Answered
Polynomial fit through a certain point
You want to fit a quadratic polynomial through your data, but you also want to force it through 3 other data points? SIGH. A qu...

8 years ago | 0

Answered
curve fitting error:nlinfit rank deficient
Whats wrong? Mainly really poor starting values. Not enough data is another good reason, and a model that is not easily fit on d...

8 years ago | 4

| accepted

Answered
I wrote a code to produce twin primes, however it is pretty strenuous for my computer and I need some high numbers to check a conjecture. Is there a better way to get twin primes. Note: these twin primes are represented by 6m's where 6m+-1 are prime.
Ok, it looks like you are still interested in this, so here is an approach targetted more at what I hear from your last comment....

8 years ago | 0

| accepted

Answered
Can anyone please help with this?
Use the tool designed to solve that problem. help polyfit

8 years ago | 1

Answered
Fit a parabola between two points (start and end), given the local inclinations in those points
Nope. Nobody can help you. Sad, but true. In fact, unless you get very lucky, nobody can ever solve this problem. Why not? You ...

8 years ago | 0

Answered
hello, i have eigen values and eigen vectors and now i need the matriz of that eigen vectors, how i do the opposite of the [V, D] = eig()?
If A is symmetric, then V*D*V' should suffice to recover A. For example: A = rand(5); A = A + A'; [V,D] = eig(A); norm(A - V*...

8 years ago | 1

| accepted

Answered
Make Matlab work for several hours can damage my laptop?
Massive, long computations with large matrices, etc., can indeed heat my computer up, forcing my fan to kick on. I use a station...

8 years ago | 0

Answered
how to control fitting in 'lsqcurvefit'?
You cannot do so with lsqnonlin or lsqcurvefit, because those tools do not allow general linear equality constraints. Sorry, but...

8 years ago | 0

Answered
how to connect neighbor points in a scattered 2D plot?
help delaunay

8 years ago | 0

| accepted

Answered
How to get nlinfit to take outliers into account?
Hmm. I could say you can't, at least not very well. Or I could say it already does take them into account, but that it just does...

8 years ago | 0

| accepted

Answered
Vector equation with two unknowns
syms V W VW = solve([ -1 0 0 ]*V == [ 0 -1/3 0 ] + [ -4 4 0 ]*W) VW = struct with fields: V: [1×1 sym] W: [1×1...

8 years ago | 2

Answered
How to calculate differences of two floating means in a vector of ~10^6 entries?
Start using MATLAB, in the way it was designed to be used. It seems here, you want to compute a floating mean, a term I've not h...

8 years ago | 1

| accepted

Answered
Why does my log-normal distribution not fit my data?
Consider thisexample: X = lognrnd(0,1,[1,1000]); histogram(X,100,'normalization','probability') hold on ezplot(@(x) lognpdf(...

8 years ago | 2

| accepted

Answered
Numerical solver finds different answer depending on guess
This question suffers from several misunderstandings about optimization tools, several common problems. First, think of an opti...

8 years ago | 0

| accepted

Answered
Need help in Optimization Problem
I'm not sure where you get the number 64 there. And indeed, the optimization toolbox will not help you, at least not directly. ...

8 years ago | 0

Answered
What is the starting point in Curve Fitting Tool?
Resolve it? Probably not completely resolve it without seeing what you did exactly, and seeing some data that you have a problem...

8 years ago | 1

| accepted

Load more