Solved


Small Riddle
Mr. Smith has two children. If the older child is a boy, what are the odds that the other child is also a boy?

bijna 6 jaar ago

Solved


Implement a counter
Write a function that returns a function that counts the number of times it is invoked. Example: >> h = counter; >> h() ...

bijna 6 jaar ago

Solved


Change string to number
Change given string to number. (hint: there is already function) Changing from ['1234'] to [1234] is one of example

bijna 6 jaar ago

Solved


Additive persistence
Inspired by Problem 2008 created by Ziko. In mathematics, the persistence of a number is the *number of times* one must apply...

bijna 6 jaar ago

Solved


Test
Answer the question and the correct answer write in vector. Only one answer is correct. 1a Yes 1b No 1c No 1d No ...

bijna 6 jaar ago

Solved


COUNT VOWEL
Count, how many times vowels occurred. EXAMPLE: x='string the MaTLaBiAn' then the answer will be 6. x='coUnt the vowEl' th...

bijna 6 jaar ago

Solved


Basic commands - Greatest common divisor
Please write a function, which, will put as output greatest common divisor. Example: A = [-5 17; 10 0];...

bijna 6 jaar ago

Solved


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

bijna 6 jaar ago

Solved


Unit conversion
Convert x degree Celsius to y degree Fahrenheit.

bijna 6 jaar ago

Solved


Replace Nonzero Numbers with 1
Given the matrix x, return the matrix y with non zero elements replaced with 1. Example: Input x = [ 1 2 0 0 0 ...

bijna 6 jaar ago

Solved


Convert degrees to radians
Given input in degrees, output to radians

bijna 6 jaar ago

Solved


Sum the real and imaginary parts of a complex number
Sum the real and imaginary parts of a complex number. Example c = 1+2i has the solution 1 + 2 = 3

bijna 6 jaar ago

Solved


Find the square of the sum of the digits of a number
If a number (n) is provided as an input, find the square of the sum of the digits of the number. Example If n = 21, the an...

bijna 6 jaar ago

Solved


Find Factrorial without using built-in function
A number is given, you have to find the factorial of the number without using built-in factroial function. You may use loops....

bijna 6 jaar ago

Solved


NO _________ ALLOWED....
So you're given a sentence where if there is a particular word in the sentence then the output is 1, if it is not there then the...

bijna 6 jaar ago

Solved


Vector of numbers divisible by 3
* Input(n) - any integer * Output(v) - vector with numbers divisible by 3(exept 0) starting from n to 0 Examples: * n=6...

bijna 6 jaar ago

Solved


Number of odd and even elements within matrix
Input(m) - any matrix with integers Output(n) - n(1)=number of odd elements, n(2)=number of even elements Example: * m=...

bijna 6 jaar ago

Solved


UICBioE240 2.10
Given a vector of numbers, give the difference between the maximum and minimum values.

bijna 6 jaar ago

Solved


Return a list sorted by number of consecutive occurrences
Inspired by Problem 38 by Cody Team. Given a vector x, return a vector y of the values in x sorted by the number of CONSECUTIVE...

bijna 6 jaar ago

Solved


Longest run of consecutive numbers
Given a vector a, find the number(s) that is/are repeated consecutively most often. For example, if you have a = [1 2 2 2 1 ...

bijna 6 jaar ago

Solved


Television Screen Dimensions
Given a width to height ratio of a TV screen given as _w_ and _h_ as well as the diagonal length of the television _l_, return t...

bijna 6 jaar ago

Solved


Joining Ranges
You are given a n-by-2 matrix. Each row represents a numeric range, e.g. x = [0 5; 10 3; 20 15; 16 19; 25 25] contains...

ongeveer 6 jaar ago

Solved


Put two time series onto the same time basis
Use interpolation to align two time series onto the same time vector. This is a problem that comes up in <http://www.mathwork...

ongeveer 6 jaar ago

Solved


Rounding off numbers to n decimals
Inspired by a mistake in one of the problems I created, I created this problem where you have to round off a floating point numb...

ongeveer 6 jaar ago

Solved


Sums of Distinct Powers
You will be given three numbers: base, nstart, and nend. Write a MATLAB script that will compute the sum of a sequence of both ...

ongeveer 6 jaar ago

Solved


Piecewise linear interpolation
Given an Mx2 vector and a row of M-1 integers, output a two column vector that linearly interpolates Y times between each succes...

ongeveer 6 jaar ago

Solved


Create logical matrix with a specific row and column sums
Given two numbers *|n|* and *|s|*, build an |n-by-n| logical matrix (of only zeros and ones), such that both the row sums and th...

ongeveer 6 jaar ago

Solved


Replace values under a limit
For a vector x and number n, the goal is to find every element of x inferior to n and replace it by n. Example x= [ 1 2 3...

ongeveer 6 jaar ago

Solved


Finding an element in a vector
x is a vector of unknown length your function should return the index of the first element in the vector that is greater than...

ongeveer 6 jaar ago

Solved


Rotate Matrix @180 degree
Rotate Matrix @180 degree Example A=[8 1 6; 3 5 7; 4 9 2], then answer would be [2 9 4;...

ongeveer 6 jaar ago

Load more