Resuelto


07 - Common functions and indexing 6
Create a variable _m_ as a magic square with the size 6 x 6 Magic squares are defined as square matrices, where the sum of a...

más de 7 años hace

Resuelto


Rounding
Round 10.67 and make 'y' equal to that number.

más de 7 años hace

Resuelto


Add two numbers
Add two numbers (For beginners)

más de 7 años hace

Resuelto


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

más de 7 años hace

Resuelto


Logical variables: Running late?
* Assign onTime with true if noTraffic is true and gasEmpty is false.

más de 7 años hace

Resuelto


Matlab Basics - Logical Tests I
Write a script to test whether a year number is for a leap year or not. eg. x = 1884 output = 1 eg. x = 3 output = 0

más de 7 años hace

Resuelto


y equals x divided by 2
function y = x/2

más de 7 años hace

Resuelto


Find out sum of all elements of given Matrix
Find out sum of all elements of given Matrix A=[1 2 3;4 5 6 ;7 8 9]; Answer must be: 45 *If you like this problem, pl...

más de 7 años hace

Resuelto


Square a Number
Given an input x, return y, which is equal to the square of x.

más de 7 años hace

Resuelto


Create a vector
Create a vector from 0 to n by intervals of 2.

más de 7 años hace

Resuelto


Matlab Basics II - squares
Write a function that takes matrix A, and squares each element in the matrix example: A = [1 2 3] output = [1 4 9]

más de 7 años hace

Resuelto


Matlab Basics II - Count rows in a matrix
Write a function that returns that number of rows in a vector or matrix x example: x = [1; 2; 3] output = 3

más de 7 años hace

Resuelto


Currency conversion
A currency exchange booth offers an exchange rate of 119.771 Japanese yen for 1 US dollar. The currency exchange booth rounds do...

más de 7 años hace

Resuelto


Area of a circle
Find the value for area of the circle if diameter is given

más de 7 años hace

Resuelto


Matlab Basics II - Minimum
Write a function that returns the minimum of each ROW of a matrix x example: x = [1 2 3; 4 5 6]; output [1;4];

más de 7 años hace

Resuelto


Array of Ones
Create a 100 X 100 array of ones.

más de 7 años hace

Resuelto


While loop: Summation
Write a while loop that assigns summedValue with the sum of all values from 1 to userNum. Assume userNum is always greater than ...

más de 7 años hace

Resuelto


Matlab Basics - y as a function of x
write a script to calculate y as a function of x, such that y = 6x^2 + 5x - 2

más de 7 años hace

Resuelto


convert matrix to single column
given any matrix, convert it to single column

más de 7 años hace

Resuelto


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

más de 7 años hace

Resuelto


Given a matrix, return the last eigen value
Given a matrix, return the first eigen value For example: x = magic(5) 17 24 1 8 15 23 5 7 14 ...

casi 8 años hace

Resuelto


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

casi 8 años hace

Resuelto


Find nearest prime number less than input number
Find nearest prime number less than input number . For example: if the input number is 125, then the nearest prime number whi...

casi 8 años hace

Resuelto


Test if two numbers have the same digits
Given two integers _x1_ and _x2_, return |true| if the numbers written with no leading zeros contain the same digits. That is, t...

casi 8 años hace

Resuelto


Assignment statements based on input value
Write an if-else statement that assigns finalValue with userValue + 5 if userValue is greater than 100. Otherwise assign finalVa...

casi 8 años hace

Resuelto


Counting down
Create a vector that counts from 450 to 200 in increments of 10.

casi 8 años hace

Resuelto


Food safety
Assign safeTemperature with 1 if foodTemperature is less than 40 or greater than 165.

casi 8 años hace

Resuelto


Switch matrix to a column vector
for e.g. x = [1 2 3 4] y = 1 3 2 4

casi 8 años hace

Resuelto


Doubling elements in a vector
Given the vector A, return B in which all numbers in A are doubling. So for: A = [ 1 5 8 ] then B = [ 1 1 5 ...

casi 8 años hace

Resuelto


Concatenate two strings
Its very easy. Just concatenate two strings.

casi 8 años hace

Cargar más