Solved

Least Absolute Deviations (L1-norm) line fit - degree n

This is a generalization of Problem 45851 for degree n <https://www.mathworks.com/matlabcentral/cody/problems/45851-least-abs...

ungefär 22 timmar ago

Solved

Least Absolute Deviations (L1-norm) line fit - degree 1

Matlab's polyfit function is very handy to find least-squares regression. It minimizes the (L2-norm) of the estimation errors, b...

3 dagar ago

Solved

Procrustean bed

Given a vector x and an integer n, convert x to a vector of length n by (1) chopping off the end if it is too long, or (2) addin...

8 dagar ago

Solved

Leap years on other planets

A year is a leap year if it is divisible by 4, but not if it is divisible by 100, unless it is also divisible by 400. This mean...

8 dagar ago

Solved

Pluralization

Define function plu(n) that returns '' (an empty string) if n=1, or 's' otherwise. This is handy for displaying messages from a...

8 dagar ago

Solved

Mystery problem

Given integer x between 1 and 50, return integer y=mystery(x), where mystery(1) = 111 mystery(6) = 809 ... mystery...

8 dagar ago

Answered

How to find index range of range of values in an array

i = find(x>=69 & x<=72);;

How to find index range of range of values in an array

i = find(x>=69 & x<=72);;

13 dagar ago | 1

Solved

Radiation Heat Transfer — View Factors (3)

View factors (aka configuration factors) are utilized in some radiation heat transfer models to estimate heat transfer rates bet...

13 dagar ago

Solved

Radiation Heat Transfer — View Factors (2)

View factors (aka configuration factors) are utilized in some radiation heat transfer models to estimate heat transfer rates bet...

13 dagar ago

Solved

Radiation Heat Transfer — View Factors (1)

View factors (aka configuration factors) are utilized in some radiation heat transfer models to estimate heat transfer rates bet...

13 dagar ago

Solved

Packing oranges - one layer

Help the seller to pack oranges efficiently. How many oranges can be put into a box in one layer without squeezing them? Give...

13 dagar ago

Solved

Cut an orange

Inspired by problem <http://www.mathworks.co.uk/matlabcentral/cody/problems/2175 2175>. A hungry matlab enthusiast has an ora...

17 dagar ago

Solved

Distance between two GPS Coordinates

A problem that arises when performing geographically weighted regression is determining the distance between GPS coordinates. GI...

18 dagar ago

Solved

Avalaible area: wall construction

You need to build a wall to enclose a certain area. Calculate the available area after you build the wall. Assumptions * ...

18 dagar ago

Solved

Pairwise Euclidean Distance

Given two matrices A,B of dimensions NxK and NxL respectively, calculate the pairwise euclidean distance of all vectors (columns...

18 dagar ago

Solved

Vector parallel to plane?

Given the coefficients of the equation which defines a plane as follows: ax+by+cz=d, return a boolean indicating whether the 2n...

19 dagar ago

Solved

Slicing the cube

A bored matlab enthusiast has a cube with volume n^3. He decides to paint the entire surface of the cube red. Then, with slices...

19 dagar ago

Solved

Parallel vectors

Return true or false depending on whether 2 vectors are parallel or not. Vectors can be 2 or 3 dimensional. The origin is not c...

19 dagar ago

Answered

y coordinates of center of buoyancy

Is this what you want? x = [-8,-8,-6,0,6,8,8,-8]; y = [10,5,1,0,1,5,10,10]; ship=polyshape(x,y); figure(1) clf hold on p...

y coordinates of center of buoyancy

Is this what you want? x = [-8,-8,-6,0,6,8,8,-8]; y = [10,5,1,0,1,5,10,10]; ship=polyshape(x,y); figure(1) clf hold on p...

20 dagar ago | 0

Solved

Get ranking of a combination looking for speed.

I have the numbers pulled without replacement from the set [1 2 3 4 5 6 7 8 9 10 11 12 13]; They are then ordered from least to...

25 dagar ago

Solved

Get ranking of a combination

I have the numbers pulled without replacement from the set [1 2 3 4 5 6 7 8 9 10 11 12 13]; They are then ordered from least to...

25 dagar ago