A résolu


Solution to Ax=b with singular A
Find solution to Ax=b problem if A is singular. Hint: Compute a minimum norm solution

plus de 9 ans il y a

A résolu


Reverse digits of a number
Reverse digits of a number. For example, return *321* for the input *123* . The left-hand zeros can be discarded. For exam...

plus de 9 ans il y a

A résolu


Find the sides of an isosceles triangle when given its area and height to its base.
Find the sides of an isosceles triangle when given its area and height to its base. Example S=12, h=4, result will be [5 5 6]...

plus de 9 ans il y a

A résolu


Calculate the sum of elements of n*n Hilbert matrix.
Calculate the sum of elements of n*n Hilbert matrix. Example n=5 HilbertMatrix=[1.0000 0.5000 0.3333 0.2500 ...

plus de 9 ans il y a

A résolu


Calculate vowel / consonant ratio of a string
Given a string, calculate the ratio of vowels to consonants for example : x = 'This is a very good Day!' y = 7/11

plus de 9 ans il y a

A résolu


Find the numeric characters in a string and return their index
Given a string S, return the index of any numeric characters. S = 'The next meeting will be held in 2 weeks.'; idx = fin...

plus de 9 ans il y a

A résolu


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

plus de 9 ans il y a

A résolu


ESEMPIO
controllo uso funzioni

plus de 9 ans il y a

A résolu


Calculate cosine without cos(x)
Solve cos(x). The use of the function cos() and sin() is not allowed.

plus de 9 ans il y a

A résolu


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

plus de 9 ans il y a

A résolu


Counting votes
x is a vector of votes, e.g. x=[1 2 3 2 2 1 3 2 1 2 2 2 2], who is the winner? 1,2,3?

plus de 9 ans il y a

A résolu


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+...

plus de 9 ans il y a

A résolu


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

plus de 9 ans il y a

A résolu


Create square matrix with given conditions.
Create square matrix which should be like given matrix M. M = [ n^2 n*(n-1) n*(n-2) ... n*2 n; n*(n-1)...

plus de 9 ans il y a

A résolu


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

plus de 9 ans il y a

A résolu


Second smallest number
What is the second smallest number in x? example: x = [1 2 3 4 5 6 7 8 9] y = 2

plus de 9 ans il y a

A résolu


Make equation that can express relationship!
Observed data [y] that vary with [x]. Unfortunately, [y] including small amount of errors. x=[1 2 3 4 5 6] y=[2.16 4.97 ...

plus de 9 ans il y a

A résolu


Number of nonzero elements in matrix
Calculate the number of nonzero elements for given matrix

plus de 9 ans il y a

A résolu


Solve equation numerically
y'=y In order to solve equation using computer, numerical analysis are needed. 1st order Euler's method is one of the metho...

plus de 9 ans il y a

A résolu


Find product of eigenvalues of n*n magic matrix.
Find product of eigenvalues of n*n magic matrix. Example n=3 Matrix= [ 8 1 6; 3 5 7; 4 ...

plus de 9 ans il y a

A résolu


Check if a rotated array was originally sorted
Suppose a sorted array is rotated at some pivot unknown to you. For example, |[0 1 2 4 5 6 7]| might become |[5 6 7 0 1 2 4]|. ...

plus de 9 ans il y a

A résolu


Count the numbers
In a array x, count the number of times the number n appears in x. for example: x = [1 2 3 4 3 2 1 2] and n = 2 the answer sh...

plus de 9 ans il y a

A résolu


Number of elements in matrix
Calculate the # of elements for given matrix

plus de 9 ans il y a

A résolu


Fast 1-D Convolution (full shape)
This is the first problem in the <http://www.mathworks.com/matlabcentral/cody/?term=Fast+1-D+Convolution fast 1-D convolution se...

plus de 9 ans il y a

A résolu


Rolling maximums above a threshold
You are given either a vector or a 2-D matrix M and a threshold value of t. Write a script that will calculate how many times t...

plus de 9 ans il y a

A résolu


solid of revolution
Given an real polynomial P and two real numbers a,b with 0<=a<=b. Calculate the volume of the solid of revolution made by rota...

plus de 9 ans il y a

A résolu


Replace 0 to NaN!
In given matrix A=[1 nan nan; 2 2 nan; nan nan 1]; replace NaN to 0. Use matrix A as a input.

plus de 9 ans il y a

A résolu


What do you get if you multiply six by nine?
The Hitchhiker's Guide to the Galaxy based task. Tip: 13-base numeral system

plus de 9 ans il y a

A résolu


How do you make seven even?
Take away the s.

plus de 9 ans il y a

A résolu


Convert array of decimal numbers into hexadecimal numbers array.
Convert array of decimal numbers into hexadecimal numbers array. Example x =[ 32 33 34 35 36 37 38 ...

plus de 9 ans il y a

Charger plus