Gelöst


Product of Array
Given an array of numbers. Get the product of the array.

fast 7 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 7 Jahre vor

Gelöst


Matrix of almost all zeros, except for main diagonal
Write a program to input an integer n and build a n-by-n matrix with the numbers 1,2,...,n on the main diagonal and zeros elsewh...

fast 7 Jahre vor

Gelöst


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

fast 7 Jahre vor

Gelöst


UICBioE240 problem 1.3
Find the length of a vector. So if A = [1 1 1 1 1] Then B = 5

fast 7 Jahre vor

Gelöst


Find the Nth Root of a Given Number
Find the Nth root of a given number x. Examples x = 4096 n = 4 y = 8 x = 625 n = 5 y = 3.6239

fast 7 Jahre vor

Gelöst


Find Index of maximum Value and maximum Value of a vector
Find the Index of the first occurrence of the maximum value in a vector and also the maximum value in the vector. Example: [...

fast 7 Jahre vor

Gelöst


prime test
find largest 2 digit prime number

fast 7 Jahre vor

Gelöst


UICBioE240 2.1
This will be useful later in the course, in conjunction to clc and clear all, what is the command to close all figure windows th...

fast 7 Jahre vor

Gelöst


Square root of a number
Write a code that will output the square root of x.

fast 7 Jahre vor

Gelöst


Matlab Basics - Switching Assignments
Switch assignments for variables x and y, for example start with x = 1 and y = 3 end with y = 1 and x = 3 Do NOT simply r...

fast 7 Jahre vor

Gelöst


Matlab Basics II - Velocity of a particle
A particle is moving in space, such that it's velocity is given by: <<http://s30.postimg.org/5rf1xtvj5/cody1.png>> write a...

fast 7 Jahre vor

Gelöst


TRON strategy toggle
Detect whether your lightcycle is on same side of existing walls as opponents lightcycle. This function is useful in toggling a...

fast 7 Jahre vor

Gelöst


Persistence will help you solve almost any problem.
Create a function without inputs that adds one to the output every time it is called. a = counterfun; disp(a) >> 1 ...

fast 7 Jahre vor

Gelöst


Check for keywords
If the entered string is a MATLAB keyword, return true else false

fast 7 Jahre vor

Gelöst


Persistent Usage
This Challenge is to implement the Matlab Persistent variable capability. Given a sequence of Calls to a function return the ...

fast 7 Jahre vor

Gelöst


Global usage
This Challenge is to utilize Global variables. Global variables are risky as the subroutine may inadvertently and unwantingly...

fast 7 Jahre vor

Gelöst


persistant sum
There will be 9 tests for this problem. In each test you will be provided with 2 integers n=[n1,n2], where n2 is equal to t...

fast 7 Jahre vor

Gelöst


Number Persistence
A number's persistence is the number of steps required to reduce it to a single digit by multiplying all its digits to obtain a ...

fast 7 Jahre vor

Gelöst


Implement a counter
Write a function that returns a function that counts the number of times it is invoked. Example: >> h = counter; >> h() ...

fast 7 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 7 Jahre vor

Gelöst


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

fast 7 Jahre vor

Gelöst


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

fast 7 Jahre vor

Gelöst


Find the area of the four walls
If length, breadth and height of the walls are given, find the area of the four walls.

fast 7 Jahre vor

Gelöst


UICBioE240 problem 1.2
Convert a column vector into a row vector. So if A = [1; 2; 3] Then B = [ 1 2 3]

fast 7 Jahre vor

Gelöst


Vector Multiplication
Vector Multiplication of three matrix as shown in test cases.

fast 7 Jahre vor

Gelöst


Remove the positive integers.
Given array,x, remove all the positive numbers and display ouput as y. Example x=[1 -2 3 -4] , output is y=[-2 -4].

fast 7 Jahre vor

Gelöst


Find out magnitude of vector
Find out magnitude of vector. Say x=[1 2 3], then answer must sqrt(1^2+2^2+3^2) Please don't use sum function. If you l...

fast 7 Jahre vor

Gelöst


Sum of diagonals elements of a matrix
Given a matrix, return the sum of all the elements across the diagonals. E.g. A = [1 2 3; 4 5 6; 7 8 9;...

fast 7 Jahre vor

Gelöst


Convert radians to degrees
Given input in radians, output to degrees

fast 7 Jahre vor

Mehr laden