A résolu


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

plus de 8 ans il y a

A résolu


Let's see how peculiar we can get
The task is to multiply two numbers. But do it in the most peculiar possible way.

plus de 8 ans il y a

A résolu


Are you in or are you out?
Given vertices specified by the vectors xv and yv, and a single point specified by the numbers X and Y, return "true" if the poi...

plus de 8 ans il y a

A résolu


Max index of 3D array
Given a three dimensional array M(m,n,p) write a code that finds the three coordinates x,y,z of the Maximum value. Example ...

plus de 8 ans il y a

A résolu


sinus function
x is the abscissa. find the absolute value of cosine of -x and the same value with changed sign.

plus de 8 ans il y a

A résolu


Average of square wave
given positive and negative peak , calculate dc level, 50% duty cycle

plus de 8 ans il y a

A résolu


Binary
Given a positive, integer n, create a function that returns the respective binary number in the form of a vector. Example: ...

plus de 8 ans il y a

A résolu


Remove from a 2-D matrix all the rows that contain at least one element less than or equal to 4
Example: in = magic(5) in = 17 24 1 8 15 23 5 7 14 16 4 6 13 20 ...

plus de 8 ans il y a

A résolu


Summation of array
Given an array, Find the sum of all of the elements in it Examples: Input x = [1 2 3 5; 4 5 6 7]; Output y is 33

plus de 8 ans il y a

A résolu


Colon operator of two vectors
You are given two vectors of equal length: VecStart, VecEnd Each vector contain a set of integers, where VecEnd(j)>=VecStar...

plus de 8 ans il y a

A résolu


Sum the elements in either diagonal of a square matrix
Sum the elements of a square matrix that lie on either the major diagonal or anti-diagonal. (Include all elements that are part ...

plus de 8 ans il y a

A résolu


BASICS - sum part of vector
Please make a function, where as input you get vector "x" and and vector "c", where in "c" vector you get indexes to sum. Examp...

plus de 8 ans il y a

A résolu


Matlab Basics - Set unwanted parts of a vector to zero
Consider a vector x, of length >= 7, write a script to set elements 2, 5, and 6 to zero. Example x = [1 2 3 4 5 6 7] --> ...

plus de 8 ans il y a

A résolu


Test Problem; Create a 5x5 array containing all ones
This is a test for learning the process of creating a Cody problem. The goal of this test problem will be to create an array,...

plus de 8 ans il y a

A résolu


Generate a random matrix A of (1,-1)
Input n: is an positive integer which serves as the dimension of the matrix A; Output: A=(Aij),where each entry Aij is either...

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

A résolu


Find Out sum of principal diagonal element of given matrix
Find out sum of principal diagonal element of given matrix If A=[1 0 0; 0 1 0;0 0 1], then answer must be 3.

plus de 8 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...

plus de 8 ans il y a

A résolu


Matlab Basics - Assigning Variables
Assign different types of data to variables: integer, double, and strings Example: A is a double, for example 2.34 B is a...

plus de 8 ans il y a

A résolu


Calculate volume of box
Calculate the volume of box,hiven its sides

plus de 8 ans il y a

A résolu


Skip by a multiple
Given an integer create an array of its multiples. Array must have a length of 15

plus de 8 ans il y a

A résolu


Angle between Two Vectors
The dot product relationship, a dot b = | a | | b | cos(theta), can be used to determine the acute angle between vector a and ve...

plus de 8 ans il y a

A résolu


Square the input
Given a scalar or vector x, return the square of each element. Example x = [7 2] answer = [49 4]

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

A résolu


Calculate square and cube of number
Calculate square and cube of number x

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

A résolu


Binary Coder
Take an input number and print the binary value of this number.

plus de 8 ans il y a

A résolu


Generate pi using logarithm
Generate pi using logarithm

plus de 8 ans il y a

A résolu


Matlab Basics - Rounding III
Write a script to round a large number to the nearest 10,000 e.g. x = 12,358,466,243 --> y = 12,358,470,000

plus de 8 ans il y a

Charger plus