Risolto


No Twins?
Write a function that accepts as input a vector and returns the same vector, but retaining only the first occurrence of an eleme...

21 giorni fa

Risolto


First non-zero element in each column
For a given matrix, calculate the index of the first non-zero element in each column. Assuming a column with all elements zero i...

21 giorni fa

Risolto


Yaw rate of the vehicle
Yaw rate defines how quickly a vehicle rotates about its vertical axis during motion. Given Vehicle speed v and Turning radius ...

21 giorni fa

Risolto


Arrange vector in ascending order
Arrange a given vector in ascending order. input = [4 5 1 2 9]; output = [1 2 4 5 9];

21 giorni fa

Risolto


Total energy

21 giorni fa

Risolto


Force and Motion 2
Two robots are pulling on an object in opposite directions. One robot pulls with a force of F1 Newtons and the other with a forc...

21 giorni fa

Risolto


Find MPG of Lightest Cars
The file cars.mat contains a table named cars with variables Model, MPG, Horsepower, Weight, and Acceleration for several classi...

21 giorni fa

Risolto


Create times-tables
At one time or another, we all had to memorize boring times tables. 5 times 5 is 25. 5 times 6 is 30. 12 times 12 is way more th...

21 giorni fa

Risolto


Turning radius of a vehicle
The turning radius represents the radius of the circular path followed by a vehicle. Given Wheelbase L and Steering angle δ, Co...

21 giorni fa

Risolto


Given an unsigned integer x, find the largest y by rearranging the bits in x
Given an unsigned integer x, find the largest y by rearranging the bits in x. Example: Input x = 10 Output y is 12 since ...

21 giorni fa

Risolto


Multiply a column by a row
* Given a column vector C and and a row vector R. * Output a matrix M. * Every column of M equals to C multiplied by correspon...

21 giorni fa

Risolto


Make a random, non-repeating vector.
This is a basic MATLAB operation. It is for instructional purposes. --- If you want to get a random permutation of integer...

21 giorni fa

Risolto


Count how many elements are above the mean
Given a vector, return the count of elements strictly greater than the mean of the vector. Example: above_mean_count([1 2 3 4 5]...

21 giorni fa

Risolto


Remove the Zero
Given an array n, remove all zeros

21 giorni fa

Risolto


Is this triangle right-angled?
Given three positive numbers a, b, c, where c is the largest number, return true if the triangle with sides a, b and c is right-...

21 giorni fa

Risolto


Convert a vector into a number
This is a sub problem related to this problem: <http://www.mathworks.com/matlabcentral/cody/problems/621-cryptomath-addition>...

21 giorni fa

Risolto


The Answer to Life, the Universe, and Everything
A variation of a previous Hitchhiker's Guide to the Galaxy problem. *Inputs:* Life, the Universe, and Everything *Output:*...

21 giorni fa

Risolto


Find the Best Hotels
Given three input variables: hotels - a list of hotel names ratings - their ratings in a city cutoff - the rating at which yo...

21 giorni fa

Risolto


Cell joiner
You are given a cell array of strings and a string delimiter. You need to produce one string which is composed of each string fr...

21 giorni fa

Risolto


reverse string
input='rama' output='amar'

21 giorni fa

Risolto


Draw 'D'.
Draw a x-by-x matrix 'D' using 0 and 1. example: x=4 ans= [1 1 1 0 1 0 0 1 1 0 0 1 1 1 1 0]

21 giorni fa

Risolto


Project Euler: Problem 5, Smallest multiple
2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder. What is the smalle...

21 giorni fa

Risolto


"Low : High - Low : High - Turn around " -- Create a subindices vector
Let two vectors *lo* and *hi* be given. The job is to create a index vector like so idx = [lo(1):hi(1) lo(2):hi(2) ...]...

21 giorni fa

Risolto


surface of a spherical planet
you just discovered its circumference, that is the input.

21 giorni fa

Risolto


Generate a vector like 1,2,2,3,3,3,4,4,4,4
Generate a vector like 1,2,2,3,3,3,4,4,4,4 So if n = 3, then return [1 2 2 3 3 3] And if n = 5, then return [1 2 2 3 3 3 4...

21 giorni fa

Risolto


Electric Power Steering (EPS) Assist Curve Calculation
Electric Power Steering (EPS) provides assist torque proportional to driver input. Given Steering torque Ts and Gain k, Compute...

21 giorni fa

Risolto


Implement simple rotation cypher
If given a letter from the set: [abc...xyz] and a shift, implement a shift cypher. Example: 'abc' with a shi...

22 giorni fa

Risolto


Factorize THIS, buddy
List the prime factors for the input number, in decreasing order. List each factor only once, even if the factorization includes...

22 giorni fa

Risolto


Remove the polynomials that have positive real elements of their roots.
The characteristic equation for a dynamic system is a polynomial whose roots indicate its behavior. If any of the roots of the p...

22 giorni fa

Risolto


Vector creation
Create a vector using square brackets going from 1 to the given value x in steps on 1. Hint: use increment.

22 giorni fa

Carica altro