已解决


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

8 years 前

已解决


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

8 years 前

已解决


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

8 years 前

已解决


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

8 years 前

已解决


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

8 years 前

已解决


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

8 years 前

已回答
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...

8 years 前 | 0

已回答
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...

8 years 前 | 1

已解决


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

8 years 前

已解决


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

8 years 前

已解决


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

8 years 前

已解决


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

8 years 前

已解决


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

8 years 前

已解决


Adding machine
Add number to all elements in given vector.

8 years 前

已解决


isnan()
Replace all nans with zeros

8 years 前

已解决


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

8 years 前

已解决


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

8 years 前

已解决


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

8 years 前

已解决


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

8 years 前

已解决


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

8 years 前

已解决


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

8 years 前

已解决


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

8 years 前

已解决


Primes Checker
Given variable inputs Check if they are prime numbers

8 years 前

已解决


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

8 years 前

已解决


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

8 years 前

已解决


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

8 years 前

已解决


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

8 years 前

已解决


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

8 years 前

已解决


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

8 years 前

已解决


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]

8 years 前

加载更多