Solved

Create a function that subtracts a from b if a and b are integers and adds them if they are floats.

casi 3 años ago

Solved

Bubble sort
Write your own bubble sort function ( <https://en.wikipedia.org/wiki/Bubble_sort>) to sort all elements in x in ascending order....

casi 3 años ago

Solved

pizza deals
Given two pizza slices of different sizes: * Slice A with angle alpha1, radius r1, and price p1 * Slice B with angle alpha2,...

casi 3 años ago

Solved

sum of ASCII
Given a string x, return the sum of all ASCII numbers of all characters. for example, if x='lala' ('l'-> 108, 'a'->97) then y...

casi 3 años ago

Solved

Translate German decimals to English decimals
The string 'x = [2,5; 5,5; 4,3];' should return 'y = [2.5; 5.5; 4.3];'

casi 3 años ago

Solved

How to calculate the length of a triangle's side given two angles and one side
You are given a triangle with angles alpha, beta and gamma and sides a opposite alpha, b opposite beta and c opposite gamma. ...

casi 3 años ago

Solved

How to permute given 3d matrix?
A(:,:,1)=[1 3] A(:,:,2)=[2 2] A(:,:,3)=[4 3] Change rows to columns and columns to rows, similar to transpose. Resul...

casi 3 años ago

Solved

Calculate geostrophic current
eta0=0.01; R=300; f=0.01; g=9.81; x=-500:50:500; y=-500:50:500; [x y]=meshgrid(x,y); eta=eta0*exp(-(x.^2+...

casi 3 años ago

Solved

Where is 1?
There is a 3d matrix [A] that consist of many zeros and only one. A=zeros(100,100,100); i=randi(100); j=randi(100); ...

casi 3 años ago

Solved

Interpolate scattered data.
Most data was scattered, and there is no gird. There are three data [c] in three different area [x,y]. x=[1 3 4]; y=[1 ...

casi 3 años ago

Solved

Removing vibration!
There are [y] that vary with [x] but y including small useless vibration. x=1:10 y=[1.71 2.03 3.28 4.05 5.10 6.82 7.69 8.3...

casi 3 años ago

Solved

Integrate Me
Given polynomial, output the integral (with k = 1 for simplicity purposes) Example: input = [2 1] % 2x+1 output = [1 1 1]...

casi 3 años ago

Solved

Generate one sample of uniform random numbers between -pi and +pi
Generate one sample of uniform random numbers between -pi and +pi.

casi 3 años ago

Solved

cube of number
find cube of number

casi 3 años ago

Solved

Expand a term
Given a term, as a string, expand it. e. g. f = '2(x + y)';

casi 3 años ago

Solved

Forward Substitution
Solve a lower triangular linear set of equations as described in the following link: http://www.people.virginia.edu/~teh1m/cody/...

casi 3 años ago

Solved

X plus binary inverted x
Given a n-bits number x, what is the sum of x to the binary inverted version of x? (this might be more simple than you think :-)...

casi 3 años ago

Solved

Tridiagonal matrix
Given vectors u and v, make a tri-diagonal symmetric matrix such that u is in the main diagonal and v is below and above diagona...

casi 3 años ago

Solved

Can we make a triangle?
Given three positive number, check whether a triangle can be made with these sides length or not. remember that in a triangle su...

casi 3 años ago

Solved

A shooting competition
In a shooting competition, the target is a square of side L containing a circle of radius R<=L/2. A player scores one point if h...

casi 3 años ago

Solved

For a rectangle, if x is the length and 2x is width. Then find out x from the area of the rectangle?
For a rectangle, if x is the length and 2x is the width. Then find out x from the area of the rectangle? if the area is equal...

casi 3 años ago

Solved

Tic Tac Toe Solver
Create a function that checks n number of tic tac toe boards housed in a 3x3xn matrix where the x's are represented as 1's (and ...

casi 3 años ago

Solved

The 17x17 Problem
This problem is sometimes referred to as the <http://bit-player.org/2009/the-17x17-challenge 17x17 challenge>. See also <http://...

casi 3 años ago

Solved

Integer complexity
Given an array, n, of positive integers, return an array, c, of the same size, in which each element is the <https://en.wikipedi...

casi 3 años ago

Solved

Probability of winning single-elimination tournament
Find the probability that the p^{th} player will win a single-elimination tournament with 2^n players where M(i,j)=probability t...

casi 3 años ago

Solved

what's my tax amount this year ?
given an annual salary x and a tax rate i calculate the amount that you have to pay.Example x = 70000; i=.10 y_correc...

casi 3 años ago

Solved

Give the Shortest Path Through The Maze
*Description* The purpose of this problem is to give the shortest path through a maze. The maze will be provided in a codifie...

casi 3 años ago

Solved

Optimization of cylinder surface area
Optimization of a cylinder surface area. What are the best parameters (radius and height) to get the minimum cylinder surface a...

casi 3 años ago

Solved

Anyone for tennis? Your chances of winning a (standard) game
Imagine you are playing tennis, and for _each point_ played your chance of winning is |x| % (input as a |<https://au.mathworks.c...

casi 3 años ago

Solved

Check if two matrices are permutations of each other
Your function should return true for the elements of one matrix is the permutation of the other matrix: x = [1 2 3; 4 5 6; ...

casi 3 años ago