Gelöst

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]

fast 2 Jahre vor

Gelöst

Building matrices
If you have matrix A, create matrix B using matrix A as an "element" A = [1 2 3 4; 5 6 7 8...

fast 2 Jahre vor

Gelöst

Find out missing number from a vector of 9 elements
You are given a vector of size 9, x = [x1 x2 x3 x4 x5 x6 x7 x8 x9] Elements of x may be randomly selected without repeati...

fast 2 Jahre vor

Gelöst

Sum of the Multiplication of Vectors
Given the vectors x and y as input, multiply the vectors and return the summation of its elements. Example: x = [1 2 ...

fast 2 Jahre vor

Gelöst

true or false
if the matrix has a zero, return true. else, return false

fast 2 Jahre vor

Gelöst

Calculate the number of elements in a matrix.
Calculate the number of elements in a matrix.

fast 2 Jahre vor

Gelöst

Calculate the square of a number (Super Easy)
The goal is to calculate the square (y) of a number (x). Good way to start MatLab for beginners.

fast 2 Jahre vor

Gelöst

started with 3 cookies and you never ate any how many are left

fast 2 Jahre vor

Gelöst

Prime number removal
remove all prime numbers from the input e.g. input = 1 2 3 4 5 6 7 8 9 10 11 12 ...

fast 2 Jahre vor

Gelöst

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

fast 2 Jahre vor

Gelöst

Matlab Basics II - Intervals
Write a function that takes an interval from a to b, and divides it into 5 parts example: a = 1, b = 2 output = 1 1.25 ...

fast 2 Jahre vor

Gelöst

Cody Matlab Version
What is the current Cody Matlab Release? *Output:* string *Examples:* '(R2012a)' or 'R2012a' Hint: We have mo...

fast 2 Jahre vor

Gelöst

JOIN STRINGS
There are two given strings 'STRING1' and 'STR ING2'.|monospaced|The output should be 'STRING1 STR ING2' or STr1='Sum';STr2='EQU...

fast 2 Jahre vor

Gelöst

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

fast 2 Jahre vor

Gelöst

The sum of individual numbers...
Well this one is taking a number and then summing the individual parts till you reach a value of 1, 2, 3, 4, 5, 6, 7, 8, 9, or 0...

fast 2 Jahre vor

Gelöst

Sum the 'edge' values of a matrix
Sum the 'edge' values of an input matrix (the values along the perimeter). Example [1 2 3 4 5 6 7 8 9] Output = ...

fast 2 Jahre vor

Gelöst

Divisors of an integer
Given a number N, return a vector V of all integers that divide N. For example, N = 10 Then V=[1 2 5 10]

fast 2 Jahre vor

Gelöst

03 - Matrix Variables 2
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_3b.png>> A 9x9 matrix of zeros, but with the following v...

fast 2 Jahre vor

Gelöst

Double the next!
Given two numbers, m and n, find a matrix m x n where each element value is twice the value of the previous element. Starting fr...

fast 2 Jahre vor

Gelöst

Create incrementing array
Given a and b generate an output matrix as shown in following examples: a=2 b=5 output=[2 20 200 2000 20000] a=4 b...

fast 2 Jahre vor

Gelöst

Determine if input is divisible by three.
Given a positive integer, n, determine if n is divisible by 3. If yes, the function should output true. If no, false.

fast 2 Jahre vor

Gelöst

Find the product of a Vector
How would you find the product of the vector [1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0] times 2?; x = [1 : 0.5 : 6]; y ...

fast 2 Jahre vor

Gelöst

Finding perimeter of a rectangle
A rectangle has a length of x centimeters and a width of w centimeters. Find the perimeter.

fast 2 Jahre vor

Gelöst

Determine the mean of matrix
Determine the mean of matrix without using mean function Hint: use simple algorithm

fast 2 Jahre vor

Gelöst

What is Sum Of all elements of Matrix
Given the matrix x, return the sum of all elements of matrix. Example: Input x = [ 1 2 0 0 0 0 6 9 3 3 ] ...

fast 2 Jahre vor

Gelöst

Horizontal matrix sort
Given a matrix x with n rows and m columns, return a matrix y with n rows and 2m columns, such that every row in x is sorted fro...

fast 2 Jahre vor

Gelöst

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

fast 2 Jahre vor

Gelöst

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

fast 2 Jahre vor

Gelöst

How many Integers?
Count the integers in a given vector |v|. You *must* use a loop to count each element separately. Examples: Input: v...

fast 2 Jahre vor

Gelöst

Remove the first, third and fifth rows of a matrix
Given a matrix x with at least five rows, return a matrix y that includes all rows of x except for th 1st, the 3rd and 5th. E...

fast 2 Jahre vor