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

2 months ago

Solved


Capitilize the first letter of every word in a string
For a given input string, capitalize every letter at the beginning of a word, and transform the rest of the letters to lower-cas...

2 months ago

Solved


It's Happy! It's Fun! It's Happy Fun Hyperball!
Yes, it's Happy Fun Hyperball! The CODY sensation that's sweeping MATLAB nation! All you need to do to get your free Happy Fun H...

2 months ago

Solved


vector indexes for a matrix
Matlab allows us to use several indexing styles making code simpler and easier to read than using loops. Vectors can have ve...

2 months ago

Solved


'Determine if array of numbers is odd'
Return true if the input single number is odd. If the input is a vector, it will return a vector or array of logical values indi...

2 months ago

Solved


The great 82-year-old
Let's answer the question below; 'I am *x* years old and I have never written programs. If I study from now, will I be able ...

2 months ago

Solved


Approximate the cosine function
Without using MATLAB trigonometric functions, calculate the cosine of an argument x to a precision of 0.0001 Hint: You may wish...

2 months ago

Solved


The proportion of NaN in the data
If NaN occupies less than half of the input data, return 1, otherwise return 0. eg. input x = [1 2 NaN ; 4 NaN 6] >>> out...

2 months ago

Solved


Separate even from odd numbers in a vector - with a loop
*Using a loop*, rearrange a vector of integers such that the odd numbers appear at the beginning, and even numbers at the end. T...

2 months ago

Solved


Separate even from odd numbers in a vector - without loops
*Without using loops*, rearrange a vector of integers such that the odd numbers appear at the beginning, and even numbers at the...

2 months ago

Solved


The average of the second largest values
Given a matrix, find the average of the second largest values in each row. The same value does not exist on a row. Example: ...

2 months ago

Solved


Exponential decay
Many dynamic processes can be approximated as an exponential decay. This applies to radioactive decay, some chemical reactions, ...

2 months ago

Solved


Find left eigenvector of row stochastic matrix
Find the left eigenvector of the given stochastic matrix P that has eigenvalue 1. Normalize the vector so the sum of the entri...

2 months ago

Solved


Determine given vector is even or odd
Find the numbers of the input vector is odd or even then replace even with 1 and odd with 0 Example x = [ 3 3 4 6 1] ...

2 months ago

Solved


I hope to lose weight healthily...
In order to reduce weight healthily, weight will be reduced by 4% every month. Please calculate how many months it will take...

2 months ago

Solved


Let's make puddings !
We will make puddings with eggs, milk and sugar. To make one pudding, we need one egg, 140(cc) of milk, 15 (g) of sugar. Now W...

2 months ago

Solved


A kind of decryption
Please convert the vector to letters by referring to the examples below. (eg.1) input vec=[34 1 59] >>> output s='A Z' (eg...

2 months ago

Solved


Add 3 (x<=100) Or Subtract 100 and add 3(100<x)
Add 3 to every element. However, if the value is greater than 100, subtract 100 and add 3. eg. input x = [45 106; 67 1...

2 months ago

Solved


Triangle of numbers
Create a matrix with the integers from 1 to |n| arranged in a triangular shape. Every row |i| of the matrix contains |i| inte...

2 months ago

Solved


Find the average of a random sequance
Write a function that generates random integers within a loop, and calculates the mean of the positive numbers only. At each ...

2 months ago

Solved


How many Integers?
Count the integers in a given vector |v|. You *must* use a loop to count each element separately. Examples: Input: v...

2 months ago

Solved


Create a magic square matrix for a given odd integer
A magic square of size 'N' is a matrix that satisfies the following criterias: # Dimension - NxN # Matrix should contain ALL...

2 months ago

Solved


Moving Median Absolute Deviation
The median absolute deviation (MAD) is defined as MAD = median(abs(A − median(A))) for a rolling window of length n. For examp...

2 months ago

Solved


Project Euler: Problem 14 Longest Collatz sequence
This problem is a hard version of "Problem 42673. Longest Collatz Sequence", because of time limits. <https://ww2.mathworks.cn/...

2 months ago

Solved


Eye Squared
For a positive integer |n| create the identity matrix with |n| elements. In case it is not possible to produce an identity ma...

2 months ago

Solved


Add a vector to a matrix
Given a matrix |mat| of size |mXn| and a row vector |v| of size |1Xs|, return a matrix with |m+1| rows that conatains |mat| over...

2 months ago

Solved


Tax Calculator
Calculate the tax for a given income. 10% tax is paid for any income up to $2,000. 20% tax is paid for additional income u...

2 months ago

Solved


Matrix to vector transformation
given a matrix, make in the output 1 column vector putting odd numbers in ascending order after that put the even numbers in des...

2 months ago

Solved


Jack's hand in "Titanic" ♤
Given a series of cards, return true if it's the famous hand. Note that i pretend that poker cards goes from 1 to 10 so be care...

2 months ago

Solved


Remove the air bubbles from a vector
_*A reduced version of Problem 112*_ Given a column vector v, return a vector w in which all the zeros have "bubbled" to the ...

2 months ago

Load more