Gelöst


Who Has the Most Change?
You have a matrix for which each row is a person and the columns represent the number of quarters, nickels, dimes, and pennies t...

11 Monate vor

Gelöst


Find the minimum element of the matrix
Example: If x = [3 9; 5 2] then y = 2

11 Monate vor

Gelöst


Swap two numbers
Example Input: a = 10 b = 20 Output a = 20 b = 10

11 Monate vor

Gelöst


Find all elements less than 0 or greater than 10 and replace them with NaN
Given an input vector x, find all elements of x less than 0 or greater than 10 and replace them with NaN. Example: Input ...

11 Monate vor

Gelöst


Determine if input is odd
Given the input n, return true if n is odd or false if n is even.

11 Monate vor

Gelöst


Divide by 4
Given the variable x as your input, divide it by 4 and put the result in y.

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

11 Monate vor

Gelöst


Back to Basics - Find no. of elements in a matrix?
Let A be a m*n matrix. Find the total no. of elements in A ? (Hint - formula based) A = [1 2 3;4 5 6]; output = 6

11 Monate vor

Gelöst


Vectorize the digits of an Integer
Create a vector of length N for an integer of N digits. x = 123045; x_vec = [1 2 3 0 4 5]; I happened upon a trick ...

11 Monate vor

Gelöst


Negative Infinity
Round the given array a towards negative infinity.

11 Monate vor

Gelöst


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

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

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

11 Monate vor

Gelöst


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

11 Monate vor

Gelöst


Find out value of sine given by degree.
Find out value of sine given by degree. If theta=30, it's value must be 0.5.

11 Monate vor

Gelöst


Write a code that will follow the equation y = x * (x + x) * x.
If x = 5, y = 5 * (5+5) * 5 = 250

11 Monate vor

Gelöst


Count ones
Write a program to count number of ones (1s) in an integer variable input. For example: Input x=2200112231 output y=3 I...

11 Monate vor

Gelöst


Which quadrant?
Given a complex number, output quadrant 'I' 'II' 'III' or 'IV' | II | I | ...

11 Monate vor

Gelöst


Positive Infinity
Round the array a towards positive infinity

11 Monate vor

Gelöst


Area of rhombus
Calculate the rhombus area

11 Monate vor

Gelöst


Compare two input matrices
Check which input matrix has more elements. Return "1" if matrix A has more elements than matrix B. Otherwise return "0". Exa...

11 Monate vor

Gelöst


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

11 Monate vor

Gelöst


Will there be a new leader?
Simply answer the title.

11 Monate vor

Gelöst


Evaluating a polynomial
Given the following polynomial and the value for x, determine y. y = 3x^5 – x^3 + 8x – 3 Example x = 1 y = 3 - 1 +...

11 Monate vor

Gelöst


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.

11 Monate vor

Gelöst


What's size of TV?
Many people buy TV. Usually they ask about diagonal. But also important are width and height. Let's assume that all TV have rati...

11 Monate vor

Gelöst


Back to basics 4 - Search Path
Covering some basic topics I haven't seen elsewhere on Cody. Return a string that is the user's portion of the current search...

11 Monate vor

Gelöst


Back to basics 3 - Temp Directory
Covering some basic topics I haven't seen elsewhere on Cody. Return a string that is the path to the system's current temp di...

11 Monate vor

Gelöst


reverse string
input='rama' output='amar'

11 Monate vor

Gelöst


CONVERT TAN TO SIN
In a right angle triangle ABC given the tan(A) then find sin(A) For example tan(A)=3/4 then sin(A)=3/5

11 Monate vor

Mehr laden