Resuelto


Compare two strings.
Compare two strings, whether they are equal or not.

10 meses hace

Resuelto


Calculating the total earnings of a factory
The row vector, prods contains the number of various products manufactured per hour. The second row vector, prices holds values ...

10 meses hace

Resuelto


Generate the Matrix!
Given n, generate the following matrix: a = [ n n-1 n-2 ... 2 1; n-1 n-1 n-2 ... 2 1; n-2 n-2 n-2 ... 2 1;...

10 meses hace

Resuelto


count upper and lower case characters
In a given input string, count and return the number of upper and lower case characters as u and l respectively. For example:...

10 meses hace

Resuelto


Project Euler: Problem 9, Pythagorean numbers
A Pythagorean triplet is a set of three natural numbers, a b c, for which, a^2 + b^2 = c^2 For example, 3^2 + 4^2 = 9 + 16 ...

10 meses hace

Resuelto


Dial Up
Each number on telephone keypads, except 0 and 1, corresponds to a set of uppercase letters as shown in this list: 2 ABC, 3 DEF...

10 meses hace

Resuelto


Project Euler: Problem 10, Sum of Primes
The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17. Find the sum of all the primes below the input, N. Thank you <http:/...

10 meses hace

Resuelto


The 5th Root
Write a function to find the 5th root of a number. It sounds easy, but the typical functions are not allowed (see the test su...

10 meses hace

Resuelto


Find the nearest prime number
Happy 5th birthday, Cody! Since 5 is a prime number, let's have some fun looking for other prime numbers. Given a positive in...

10 meses hace

Resuelto


surface areas of a cylinder
There are 3 inputs: option, radius and height. If option= '1', compute the lateral surface area of the cylinder, for option 2 ca...

10 meses hace

Resuelto


Repetition of matrices
*A is a bold matrix: [1 2 3; 4 5 6;7 8 9]* Given an integer 'n' , a matrix B exists such that has n copies of A in the row an...

10 meses hace

Resuelto


Joules to Megatons of TnT
Given joules, J, make a function that converts to megatons of TNT.

10 meses hace

Resuelto


MPS to MPH
Given the speed in miles per second, find the speed in miles per hour.

10 meses hace

Resuelto


Degrees to Radian
Convert degrees to radians

10 meses hace

Resuelto


Hydrostatic Pressure
Given depth(height), in m, find the pressure under a body of water. Need to know the density of water(kg/m^3), and gravity(m/s^2...

10 meses hace

Resuelto


Values in Array
How many values are in the array

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

10 meses hace

Resuelto


Sum of cubes
Write a program to determine sum of cubes of first n odd numbers.

10 meses hace

Resuelto


Create a constant offset.
Add a constant offset to an array. Example a = [1 3 5 9] offset = 2 y = [3 5 7 11]

10 meses hace

Resuelto


Nth root
Nth root of a number x

10 meses hace

Resuelto


Delete x value in given vector y.
Delete x value in given vector y. Exapmle x=5; y=[ 1 2 5 6 74 5 2 5] result=[1 2 6 74 2]

10 meses hace

Resuelto


Calculate solution of given polynomial
For example, y=function([3 -2 -4]) In here, input vector indicate 3*x^2-2*x-4, y is solution of former equation. y=[1.5...

10 meses hace

Resuelto


Calculate numerical integration.
x=0:0.01:1 y=@(x)x.^2 Using given two inputs(x and y), conduct numerical integration in x. (hint: trapz)

10 meses hace

Resuelto


Calculate correlation.
There are two data. y1=[0 1 2 3 4]' y2=[2 3 4 5 6]' We can see positive relationship between y1 and y2. The relations...

10 meses hace

Resuelto


Save variables
a=[1] Save variable a that is located in workspace into current folder. File name should be 'a.mat'

10 meses hace

Resuelto


Change matrix to vector2
From x = 4 3 5 1 5 1 To y = 4 3 5 1 ...

10 meses hace

Resuelto


Where is 1?
There is a 3d matrix [A] that consist of many zeros and only one. A=zeros(100,100,100); i=randi(100); j=randi(100); k=randi(...

10 meses hace

Resuelto


Solve the system of linear equations
4x - 2y +6z=8 2x + 8y +2z=4 6x + 10y +3z=0 Input is each coefficient of polynomial. For example, a=[4 ...

10 meses hace

Resuelto


Upper triangular matrix
Create a function to retrieve the upper triangular matrix of a matrix (without using tril). The matrix will always be square. ...

10 meses hace

Resuelto


Extract a specific part of matrix!
In the given matrix, extract element that have odd rows and column number. For example A=[1 4 2 3 5] B=extractodd(A);...

10 meses hace

Cargar más