Gelöst


Special matrix
Make a square matrix with this shape. For n=4 M = 1 1 0 0 1 0 1 0 0 1 0 ...

mehr als 9 Jahre vor

Gelöst


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

mehr als 9 Jahre vor

Gelöst


Sum function: Counting cookies
Row array troopCookieSales contains the number of boxes of cookies sold by each troop member. Assign totalSales with the sum of ...

mehr als 9 Jahre vor

Gelöst


Modify an array's elements
Write a for loop that iterates from 1 to numberSamples to double any element's value in dataSamples that is less than minValue. ...

mehr als 9 Jahre vor

Gelöst


Integer or Float?
Test an input to see whether it is an integer or a floating point number. If it is an integer return 1 for 'true'. Otherwise ret...

mehr als 9 Jahre vor

Gelöst


Find nth maximum
Find nth maximum in a vector of integer numbers. Return NaN if no such number exists. x = [2 6 4 9 -10 3 1 5 -10]; So ...

mehr als 9 Jahre vor

Gelöst


Writing a nested function: BMI calculation
Write a nested function CalculateBMI that assigns bmiValue given a user's weight and height. Use the following equations to calc...

mehr als 9 Jahre vor

Gelöst


Is My Wife Wrong?
Answer the question. (see also <http://www.mathworks.com/matlabcentral/cody/problems/149-is-my-wife-right Problem 149: Is my ...

mehr als 9 Jahre vor

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]

mehr als 9 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...

mehr als 9 Jahre vor

Gelöst


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

mehr als 9 Jahre vor

Gelöst


Times 3 problem
When you enter the number, it should return the number multiplied by 3

mehr als 9 Jahre vor

Gelöst


square number
Square a number

mehr als 9 Jahre vor

Gelöst


Create an index-powered vector
Given a input vector x, return y as index-powered vector as shown below. Example x = [2 3 6 9] then y should be [...

mehr als 9 Jahre vor

Gelöst


Simple date to serial no. conversion
Convert a date string to a serial date number. For example if you take x='19-May-2001' then the result is 730990 x...

mehr als 9 Jahre vor

Gelöst


construct matrix with identical rows
Input a row vector such as x=1:10. Now we need to construct a matrix with L rows,of which every row vector is a copy of x. E...

mehr als 9 Jahre vor

Gelöst


Flip the bit
Given an input character string (e.g. '1001'), return a character string with the bits flipped ('0110').

mehr als 9 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 = ...

mehr als 9 Jahre vor

Gelöst


Vector of numbers divisible by 3
* Input(n) - any integer * Output(v) - vector with numbers divisible by 3(exept 0) starting from n to 0 Examples: * n=6...

mehr als 9 Jahre vor

Gelöst


Prime checker
Complete the recursive function to determine if a number is prime. Skeletal code is provided in the PrimeChecker function.

mehr als 9 Jahre vor

Gelöst


Health app
A health app records a user's weight and displays the change in weight from the previous measurement to the next. Assign weightC...

mehr als 9 Jahre vor

Gelöst


subtract central cross
Given an n-by-n square matrix, where n is an odd number, return the matrix without the central row and the central column.

mehr als 9 Jahre vor

Gelöst


Finding peaks
Find the peak values in the signal. The peak value is defined as the local maxima. For example, x= [1 12 3 2 7 0 3 1 19 7]; ...

mehr als 9 Jahre vor

Gelöst


Is this number Munchhausen Narcissistic?
In this problem, simply return 1 if a supplied number is Munchhausen narcissistic or 0 if not. Example 153 is narcissistic...

mehr als 9 Jahre vor

Gelöst


Half-Swap
Given a vector with an even number of elements, rearrange it so that the elements in its first half are switched with those i...

mehr als 9 Jahre vor

Gelöst


Luggage delivery
Assign deliveryCost with the cost to deliver a piece of baggage weighing baggageWeight. The service charges twenty dollars for ...

mehr als 9 Jahre vor

Gelöst


Palindrome Check
Check whether the entire matrix is palindrome or not. Example matrix = [7 8 7] matrix_reverse = [7 8 7] So the mat...

mehr als 9 Jahre vor

Gelöst


Relative ratio of "1" in binary number
Input(n) is positive integer number Output(r) is (number of "1" in binary input) / (number of bits). Example: * n=0; r=...

mehr als 9 Jahre vor

Gelöst


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

mehr als 9 Jahre vor

Gelöst


Flip the vector from right to left
Flip the vector from right to left. Examples x=[1:5], then y=[5 4 3 2 1] x=[1 4 6], then y=[6 4 1]; Request not ...

mehr als 9 Jahre vor

Mehr laden