Resuelto


Nearest Numbers
Given a row vector of numbers, find the indices of the two nearest numbers. Examples: [index1 index2] = nearestNumbers([2 5 3...

17 días hace

Resuelto


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

17 días hace

Resuelto


De-dupe
Remove all the redundant elements in a vector, but keep the first occurrence of each value in its original location. So if a =...

17 días hace

Resuelto


Quote Doubler
Given a string s1, find all occurrences of the single quote character and replace them with two occurrences of the single quote ...

17 días hace

Resuelto


Estimating Monthly Electricity Cost for a Household Appliance
You recently bought an electric kettle for your kitchen, and you want to estimate how much it costs to run every month. The kett...

17 días hace

Resuelto


Longest run of consecutive numbers
Given a vector a, find the number(s) that is/are repeated consecutively most often. For example, if you have a = [1 2 2 2 1 ...

17 días hace

Resuelto


Rescale Scores
Each column (except last) of matrix X contains students' scores in a course assignment or a test. The last column has a weighted...

17 días hace

Resuelto


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

17 días hace

Resuelto


Pi Estimate 1
Estimate Pi as described in the following link: <http://www.people.virginia.edu/~teh1m/cody/Pi_estimation1.pdf>

17 días hace

Resuelto


subtract central cross
Given an n-by-n square matrix, where n is an odd number, return the matrix without the central row and the central column.

18 días hace

Resuelto


frame of the matrix
Given the matrix M, return M without the external frame.

18 días hace

Resuelto


Given a matrix, swap the 2nd & 3rd columns
If a = [1 2 3 4; 1 2 3 4; 1 2 3 4; 1 2 3 4]; then the result is ans = 1 3 2 4 1 3 2...

18 días hace

Resuelto


Voltage in a lamp
A lamp is measured to have a resistance of R ohms when it operates at a power of P Watts. What is the voltage (in volts) being a...

18 días hace

Resuelto


Stress-Strain Properties - 5
Similar to the previous problem, materials may be characterized by their stiffness-to-weight ratio, which is the elastic modulus...

18 días hace

Resuelto


Stress-Strain Properties - 4
A common measure of the ability of a material to carry load per unit mass is termed strength-to-weight ratio and is calculated b...

18 días hace

Resuelto


Stress-Strain Properties - 3
A brittle material will not exhibit a yield point. In other words, the yield point and failure point coincide. In such cases, th...

18 días hace

Resuelto


Stress-Strain Properties - 2
The resilience of a material is its ability to resist permanent (or plastic) deformation. The resilience coincides with the elas...

18 días hace

Resuelto


Stress-Strain Properties - 1
This is the first in a series of problems regarding mechanics of materials, in particular, material properties drawn from stress...

18 días hace

Resuelto


Matrix Construction I
Given n, construct a matrix as shown in the example below. Example For n=8, the output should look like this: 1 2 3 4 ...

18 días hace

Resuelto


Height of a right-angled triangle
Given numbers a, b and c, find the height of the right angled triangle with sides a and b and hypotenuse c, for the base c. If a...

18 días hace

Resuelto


Find my daddy long leg (No 's')
Given the ratio of the two legs (longer / shorter), and the hypotenuse length, find the value of the bigger leg.

18 días hace

Resuelto


Calculate the area of a triangle between three points
Calculate the area of a triangle between three points: P1(X1,Y1) P2(X2,Y2) P3(X3,Y3) these three points are the vertices of ...

18 días hace

Resuelto


Make roundn function
Make roundn function using round. x=0.55555 y=function(x,1) y=1 y=function(x,2) y=0.6 y=function(x,3) ...

18 días hace

Resuelto


Rounding off numbers to n decimals
Inspired by a mistake in one of the problems I created, I created this problem where you have to round off a floating point numb...

18 días hace

Resuelto


Matlab Basics - Rounding III
Write a script to round a large number to the nearest 10,000 e.g. x = 12,358,466,243 --> y = 12,358,470,000

18 días hace

Resuelto


Matlab Basics - Rounding II
Write a script to round a variable x to 3 decimal places: e.g. x = 2.3456 --> y = 2.346

18 días hace

Resuelto


Check that number is whole number
Check that number is whole number Say x=15, then answer is 1. x=15.2 , then answer is 0. http://en.wikipedia.org/wiki/Whole_numb...

18 días hace

Resuelto


MATLAB Basic: rounding IV
Do rounding towards plus infinity. Example: -8.8, answer -8 +8.1 answer 9 +8.50 answer 9

18 días hace

Resuelto


MATLAB Basic: rounding III
Do rounding towards minus infinity. Example: -8.8, answer -9 +8.1 answer 8 +8.50 answer 8

19 días hace

Resuelto


MATLAB Basic: rounding
Do rounding near to zero Example: -8.8, answer -8 +8.1 answer 8

19 días hace

Cargar más