Resuelto


Probabilities - Balls and urns - 02
The urn contains B blue balls and R red balls. Each trial consists of drawing one random ball from the urn and observing its col...

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


Adding each element
Add the each element of the matrix.

casi 10 años hace

Resuelto


Select primes from the matrix.
Select primes from the matrix.

casi 10 años hace

Resuelto


Create a code for XNOR
Given two inputs, output XNOR of those two

casi 10 años hace

Resuelto


Find the outcast
All pairs have the same difference except for one. Output the index of the latter Example: input =[0 1; 1 0; 2 3; 4 5;] ou...

casi 10 años hace

Resuelto


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 10 años hace

Resuelto


Find my daddy long leg (No 's')
Given the ratio of the two legs,and the hypotenuse, find the value of the bigger leg

casi 10 años hace

Resuelto


Calculate RMSE
RMSE(Root Mean Square Error) is widely used to calculate error. Calculate RMSE between [a] and [b] a=[1 2 3 4] b=[0 1 2 ...

casi 10 años hace

Resuelto


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 10 años hace

Resuelto


Ceil Me Now
Get the ceiling of the input matrix

casi 10 años hace

Resuelto


How to find average of each column ?
How to find average of each column for a given matrix?

casi 10 años hace

Resuelto


how to find diagonal elements of a matrix?
how to find diagonal elements of a matrix?

casi 10 años hace

Resuelto


Calculate correlation.
There are two data. y1=[0 1 2 3 4]' y2=[2 3 4 5 6]' We can see positive relationship between y1 and y2. The relations...

casi 10 años hace

Resuelto


N-plicate me
Modified version of duplicate and triplicate me. Repeat elements of input vector with given input n Ex: input = [1 2 3 4 5...

casi 10 años hace

Resuelto


Calculate circle's property
[A R]=function(r) r is radius, A is area of circles, R is circumference.

casi 10 años hace

Resuelto


Calculate area of sector
A=function(r,seta) r is radius of sector, seta is angle of sector, and A is its area.

casi 10 años hace

Resuelto


Change coordinate from Cartesian to spherical coordinates.
[x,y,z] -> [t,p,r] [x,y,z] is a point in the Cartesian coordinates. change its coordinate to spherical (t,p,r), t is azimuth,...

casi 10 años hace

Resuelto


Calculate inverse matrix in square matrix
A=eye(3) Calculate inverse matrix of given input. B=function(A) ans = 1 0 0 0 1 0 ...

casi 10 años hace

Resuelto


Calculate inverse matrix in m by n matrix
x=(1:10)' y=roundn(2*x+7*rand(size(x)),-1) a*x=y Estimate a using inverse matrix calculation. This is principle of li...

casi 10 años hace

Resuelto


Vectors multiplication.
Multiply two vectors x transposed and y.Example x = [1 2 3 4 5 6 7 8 9 10 ] y = [ 1 2 ...

casi 10 años hace

Resuelto


Pointwise multiplication of vectors.
Pointwise multiplication of vectors x and y. Example x= [1 3 5 7 9 11 13 15 17 19] y=[ 1 4...

casi 10 años hace

Resuelto


Sum positive elements of matrix.
Calculate sum of positive elements of the matrix.

casi 10 años hace

Resuelto


Set x value to each even index of vector y.
Set x value to each even index of vector y.

casi 10 años hace

Resuelto


Calculate some equation
Using given inputs x and z, make two outputs that are y1=(xz)/(x/z)^2+14x^2-0.8z^2 y2=x^z-z^x+(x/z)^2-(z/x)^2

casi 10 años hace

Resuelto


Calculate temperature of object
An object that have initial temperature T0 is in a room that has temperature Ts. The object's temperature in time t is T=Ts+(...

casi 10 años hace

Resuelto


Calculate triangle's hypotenuse
There are 634 eggs. A box can take 18 eggs. How many boxes are needed? Input is number of eggs and output is number of needed...

casi 10 años hace

Resuelto


Compare two strings.
Compare two strings, whether they are equal or not.

casi 10 años hace

Resuelto


Сoncatenate two strings.
Сoncatenate two strings. Example s1='Hello' s2='world' result='Hello world'

casi 10 años hace

Resuelto


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 10 años hace

Cargar más