Solved


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

10 years ago

Solved


time difference
The arrays x and y contain time values in the form of: x = [hours minutes seconds] Create the output z which contains the...

10 years ago

Solved


Chicken Race
2 chickens, Pete and Fred, compete in a 100 meter race. Pete runs at a velocity of vp meter/second and Fred is slower, running ...

10 years ago

Solved


Remove multiples of N
in the vector x remove all multiples of N. x = [1 2 3 4 5 6]; N = 2; Then y = [1 3 5];

10 years ago

Solved


Energy of an object
Calculate the total mechanical energy of an object. Total Energy= Potential energy + Kinetic energy P.E.=m*g*h K.E.=1/2...

10 years ago

Solved


Find the volume of cone
Find the volume of cone, when given radius(r) and height(h).

10 years ago

Answered
my question is can anyone improve my code to get the right answer?
It seems like to decide given year is whether or not a leap year. If you use the matlab 2016b, you can use the function 'leapyea...

10 years ago | 0

Answered
hi, I have array a = [5 4 0;3 1 0;5 7 0], how can I replace the value in third column (a(:,3)) with the values in column 1 (a(:,1)) when a(:,1) > a(:,2) . I need obtain [5 3,5] in the third column
I think the description of your question is not clear, a(:,1)>a(:,2) is a column vector not all true. Is this your judge conditi...

10 years ago | 1

Solved


Determinant of a 3x3 Matrix
Return the determinant of a 3x3 matrix. The built-in Matlab function det is not allowed.

10 years ago

Solved


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

10 years ago

Solved


Annoying population
Every year the number of annoying persons in the office triples Found the population, given a(0) and t

10 years ago

Solved


Return strings encapsulated by braces
Return all substrings that are contained within braces ({}). For example: str = 'x = rho*x{-1} + (1-rho)*y{+1}'; when...

10 years ago

Solved


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

10 years ago

Solved


Adding machine
Add number to all elements in given vector.

10 years ago

Solved


isnan()
Replace all nans with zeros

10 years ago

Solved


Recursion at variable input
input of any length a =2 b =2 c =3 output = (a^b)^c = 64

10 years ago

Solved


Check if a matrix is a palindrome in all directions
Check if a matrix is a palindrome both vertically and horizontally. You function will return *true* for |[1,2,1]| or |[2,7,2;...

10 years ago

Solved


Move if I am Optimus Prime
If the number is a prime, roll out!

10 years ago

Solved


Leap year or Not
Check if a given year is Leap year or not.

10 years ago

Solved


Calculate BMI
BMI = (weight_in_lbs * 703) / (height_in_inches^2) Inputs are in kg and cm

10 years ago

Solved


Max Sum That You Can Get Of 2 Numbers given variable input
Given variable input length,combine 2 numbers from and output maximum sum the combinations can generate Example x = 3; y = 5;...

10 years ago

Solved


Given X and Y, Get the Displacement Travelled
Given startX, start Y, endX and endY Get the displacement travelled %x = [startX endX] %y = [startY endY] x = [0 3]; y = [0...

10 years ago

Solved


Primes Checker
Given variable inputs Check if they are prime numbers

10 years ago

Solved


Combine the digits to output numbers
input could be of any length e.g. 1. in1 = 1 in2 = 2 output = 12 2. in1 = 2 in2 = 1 in3 = 0 output = 210

10 years ago

Solved


What's my favourite food?
The spicier the better.

10 years ago

Solved


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

10 years 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; ...

10 years ago

Solved


How many bottles
Sometimes if you buy a drink in a glass bottle you can return that bottle and get some money back. Let's assume we have "x" amo...

10 years ago

Solved


Convert Miles To Kilometers
Given input in miles, output into kilometers

10 years ago

Solved


Transpose Matrix Without Using Built-in Matlab Function
Transpose Matrix Without Using Built-in Matlab Function Example a = [1;2;3] out = [1 2 3]

10 years ago

Load more