AndreasBuus

5 Reputation

One Badge

5 years, 138 days

MaplePrimes Activity


These are replies submitted by AndreasBuus

@tomleslie again.

The reason i needed this is because iterative equation like this became annoying

n__1*(X__1 - X)^2 + n__2*(X__2 - X)^2 + n__3*(X__3 - X)^2 + n__4*(X__4 - X)^2;
                        2.31928333333333

 

Your solution works great, but is somewhat difficult to overlook, will browsing your fill.

add(eval(cat(n__, i))*(eval(cat(X__, i)) - X)^2, i = 1 .. 4);
                        2.31928333333333

 

is there a way to simplify this?

 

 

@tomleslie thank you for the answer!

Page 1 of 1