Risolto


Matrix multiplication across rows
Given matrix m, return matrix n such that, rows of n are result of multiplication of the rows of the input matrix Example ...

oltre 3 anni fa

Risolto


Create an index-powered vector
Given a input vector x, return y as index-powered vector as shown below. Example x = [2 3 6 9] then y should be [...

oltre 3 anni fa

Risolto


Volume of a box
Given a box with a length a, width b, and height c. Solve the volume of the box.

oltre 3 anni fa

Risolto


Box!
Given a box, find the volume of the cube. With each side = a.

oltre 3 anni fa

Risolto


Sum of odd numbers in a matrix
Find the sum of all the odd numbers in a matrix. Example x = [2 3 5 7 1 4 11] y = 27

oltre 3 anni fa

Risolto


All your base are belong to us
Find the base _b_ logarithm of the input decimal number _x_. Express the output as a decimal number. The first argument is the n...

oltre 3 anni fa

Risolto


High school cafeteria
Given an input vector of positive integers, return a row vector with the primes first (in increasing order) and the composites n...

oltre 3 anni fa

Risolto


Number of Even Elements in Fibonacci Sequence
Find how many even Fibonacci numbers are available in the first d numbers. Consider the following first 14 numbers 1 1 2...

oltre 3 anni fa

Risolto


Check if equal
Return true if all the elements of an nD array are equal, false otherwise.

oltre 3 anni fa

Risolto


Is the input divisible by 3?
Return true if the input is divisible by 3 and false if not.

oltre 3 anni fa

Risolto


Convert Fahrenheit to Celsius
Calculate the Celsius temperature C given the Fahrenheit temperature F. Examples: Input F = 90 Output C is 32.22 I...

oltre 3 anni fa

Risolto


Create a Standard Size Vector
Given an input x, create a row vector y from 1 to x with 5 elements.

oltre 3 anni fa

Risolto


find the maximum element of the matrix
for e.g x = [1 2; 3 4] y = 4

oltre 3 anni fa

Risolto


Back to basics 14 - Keywords
Covering some basic topics I haven't seen elsewhere on Cody. Return a cell array of all MATLAB keywords

oltre 3 anni fa

Risolto


Replacing a row
For matrix G=[1 2 3; 4 5 6; 7 8 9] Replace the 2nd row with 8s **remember to create matrix G

oltre 3 anni fa

Risolto


Prime numbers between a , b.
Find all prime number between a & b (including a and b). example: a=100 b=120 y= [101 103 107 109 113]

oltre 3 anni fa

Risolto


Draw 'I'
Given n as input, draw a n-by-n matrix 'I' using 0 and 1. example: n=3 ans= [0 1 0 0 1 0 0 1 0] n=...

oltre 3 anni fa

Risolto


Round to Nearest Multiple of 10^n

oltre 3 anni fa

Risolto


RISK board game battle simulation
Given two positive integer inputs, a (attacker army units) and d (defender army units) return the probablity of victory (from 0....

oltre 3 anni fa

Risolto


Check to see if a Sudoku Puzzle is Solved
*Description:* Your task, should you choose to accept it, is to make a function that checks to see if a 9x9 matrix of integer...

oltre 3 anni fa

Risolto


Matlab Basics II - Free Fall
An object freely falling from rest under gravity covers a distance x given by: x = 1/2 gt^2 write a function that calculat...

oltre 3 anni fa

Risolto


Who is the smartest MATLAB programmer?
Who is the smartest MATLAB programmer? Examples: Input x = 'Is it Obama?' Output = 'Me!' Input x = 'Who ?' Ou...

oltre 3 anni fa

Risolto


Create matrix of replicated elements
Given an input element x, and the dimensions, (m, n) return a matrix of size m x n filled with element x. Example: Input: ...

oltre 3 anni fa

Risolto


Getting logical indexes
This is a basic MATLAB operation. It is for instructional purposes. --- Logical indexing works like this. thresh = 4...

oltre 3 anni fa

Risolto


"mirror" matrix
Create n x 2n "mirror" matrix of this type: Examples For n = 2 m = [ 1 2 2 1 1 2 2 1 ] For n = 3 m = ...

oltre 3 anni fa

Risolto


Sum the numbers on the main diagonal
Sum the numbers on the main diagonal of an n-by-n matrix. For input: A = [1 2 4 3 6 2 2 4 7]...

oltre 3 anni fa

Risolto


Create a magic square matrix for a given odd integer
A magic square of size 'N' is a matrix that satisfies the following criterias: # Dimension - NxN # Matrix should contain ALL...

oltre 3 anni fa

Risolto


Optimization of cylinder surface area
Optimization of a cylinder surface area. What are the best parameters (radius and height) to get the minimum cylinder surface a...

oltre 3 anni fa

Risolto


pressure to dB?
given x ratio of pressure, find corresponding y dB

oltre 3 anni fa

Carica altro