A résolu


What percentage?
Calculate the output c as the percentage of a on b for given a and b.

environ 6 ans il y a

A résolu


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

environ 6 ans il y a

A résolu


Calculate the centroid of a triangle
Info: https://en.wikipedia.org/wiki/Centroid Example Input: x = [0 0 1]; % x-coordinate y = [0 1 0]; % y-coordinat...

environ 6 ans il y a

A résolu


prime to each other
Given two integers n1, n2 greater than 1, find out if they have common divisors or are prime to each other. Return "true" if the...

environ 6 ans il y a

A résolu


Vector Magnitude Calculator
'a' is a vector that starts at the origin and ends at (x, y). Find ||a||. Hint: It is as simple as "ABC".

environ 6 ans il y a

A résolu


Output any real number that is neither positive nor negative
Output any real number that is neither positive nor negative

environ 6 ans il y a

A résolu


Create a square matrix of multiples
Given an input, N, output a matrix N x N with each row containing multiples of the first element of each row. This also applies...

environ 6 ans il y a

A résolu


Matlab Basics - Create a row vector
Write a Matlab script to create a row vector of 10 consecutive numbers x = [1 2 3 4 5 6 7 8 9 10]

environ 6 ans il y a

A résolu


find the surface area of a cube
given cube side length x, find the surface area of the cube, set it equal to y

environ 6 ans il y a

A résolu


Which quadrant?
Given a complex number, output quadrant 'I' 'II' 'III' or 'IV' | II | I | ...

environ 6 ans il y a

A résolu


Who invented zero?
We know the importance zero in computer science, mathematics... but who invented zero? Clue: He was the first in the line ...

environ 6 ans il y a

A résolu


give nth decimal place of pi
max 15th place after the decimal point is ok for now

environ 6 ans il y a

A résolu


Back to basics 4 - Search Path
Covering some basic topics I haven't seen elsewhere on Cody. Return a string that is the user's portion of the current search...

environ 6 ans il y a

A résolu


Wind Chill Computation
On a windy day, a temperature of 15 degrees may feel colder, perhaps 7 degrees. The formula below calculates the "wind chill," i...

environ 6 ans il y a

A résolu


Try 1.5.4: Celsius to Fahrenheit
Write a program to convert an input given in Celsius to Fahrenheit. Examples: Input celsiusValue = 100 Output fahrValu...

environ 6 ans il y a

A résolu


Count photos
Given n people, everyone must have pictures taken with everyone, each photo includes only two persons, please count the total nu...

environ 6 ans il y a

A résolu


only input
Return the output without writing any code into the function.

environ 6 ans il y a

A résolu


Replace May with April
For instance, if the input is input_str = 'The flowers may bloom in April'; then the output is output_str = 'The flo...

environ 6 ans il y a

A résolu


Generate a NaN...on purpose
The goal is to create a function that will return a single "NaN" without using the nan function. I am interested to see how many...

environ 6 ans il y a

A résolu


Split a string into chunks of specified length
Given a string and a vector of integers, break the string into chunks whose lengths are given by the elements of the vector. Ex...

environ 6 ans il y a

A résolu


CONVERT TAN TO SIN
In a right angle triangle ABC given the tan(A) then find sin(A) For example tan(A)=3/4 then sin(A)=3/5

environ 6 ans il y a

A résolu


Matlab Basics - Rounding I
Write a script to round x DOWN to the next lowest integer: e.g. x = 2.3 --> x = 2 also: x = 2.7 --> x = 2

environ 6 ans il y a

A résolu


Change string to number
Change given string to number. (hint: there is already function) Changing from ['1234'] to [1234] is one of example

environ 6 ans il y a

A résolu


Create an anti-identity matrix
Create an anti-identity matrix of given dimension. Examples n = 2 A = [0 1; 1 0] n = 3 A = [0 0 1; 0 1 0; 1 0 0...

environ 6 ans il y a

A résolu


Matlab Basics II - Extract last 3 elements of a vector
Let x be a vector of unknown length, we are always interested in the last 3 numbers in the vector, write a function that gives t...

environ 6 ans il y a

A résolu


Matlab Basics II - Unit Conversion
Write a function that converts Kg to lbs, returns the answer to the nearest 1/100th of a pound

environ 6 ans il y a

A résolu


Matlab Basics II - 3 Dimensional Arrays
Assume x is a 3D array with n pages, representing students in a class, for each student (page in the array, the 3rd dimension), ...

environ 6 ans il y a

A résolu


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

environ 6 ans il y a

A résolu


Counting Squares
An algorithm starts with a single square and on each of its next iterations adds new squares all around the outside as shown bel...

environ 6 ans il y a

A résolu


Make a vector of prime numbers
Input(n) - length of vector with prime numbers Output(v) - vector of prime numbers Example: * n=1; v=2 * n=3; v=[2 3 5...

environ 6 ans il y a

Charger plus