Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

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

casi 10 años hace | 0

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

casi 10 años hace | 1

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


Adding machine
Add number to all elements in given vector.

casi 10 años hace

Resuelto


isnan()
Replace all nans with zeros

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


Primes Checker
Given variable inputs Check if they are prime numbers

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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]

casi 10 años hace

Cargar más