Solved


Create cell array of strings
Convert the input to a cell array, but only if necessary. If the input is a string, return a 1-by-1 cell array containing the...

meer dan 3 jaar ago

Solved


Combined Ages 2 - Symmetric, n ≥ 3
Following on <http://www.mathworks.com/matlabcentral/cody/problems/42382-combined-ages-1-symmetric-n-3 Combined Ages 2>, you wil...

meer dan 3 jaar ago

Solved


Determine if input is a valid AHP evaluation matrix
Input is a matrix. Output is a true or false statement (1 or 0). Return true if input is a valid Analytic Hierarchy Process eval...

meer dan 3 jaar ago

Solved


Projector Matrix
Write a function to determine whether or not the matrix is a projector. Projector matrices are defined as P^2 = P.

meer dan 3 jaar ago

Solved


Combined Ages 1 - Symmetric, n = 3
You have probably seen the common riddle wherein combined ages are provided and you must determine the individual ages. For exam...

meer dan 3 jaar ago

Solved


Bit calculation
Give me the count of numbers from 1 to n having their last two bits as 0. For example function y = ret_count(4) y = x...

meer dan 3 jaar ago

Solved


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

meer dan 3 jaar ago

Solved


Create the following sequence : 0 1 1 4 9 25 64 169 ...
The sequence 0, 1, 1, 4, 9, 25, 64, 169, ... represents the square of the sequence of Fibonacci numbers. Let n repres...

meer dan 3 jaar ago

Solved


Area of Ellipse

meer dan 3 jaar ago

Solved


Solve the equation. Find X.

meer dan 3 jaar ago

Solved


Diagonal Pattern
For a positive integer |n|, return an |nXn| matrix |mat| such that the value of each element in row |i| and column |j| is given ...

meer dan 3 jaar ago

Solved


Put Two 1D matrices into one 1D matrix
Example: If input a = [1 2 3 4 5]; input b = [10 9 8 7 6]; then output will be, y_correct = [1 10 2 9 3 8 4 7 5...

meer dan 3 jaar ago

Solved


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

meer dan 3 jaar ago

Solved


Can the given sides form a triangle?
Can the three given sides form a triangle?

meer dan 3 jaar ago

Solved


factor to number
e.g. input number x=10 then it should produce y=25 or x=100 then y should be 2255. write a function or code to generate the same...

meer dan 3 jaar ago

Solved


Diagonal & Anti-Diagonal Matrix: Easy
Create a matrix as shown below from "magic" square. For example: if input x=9;then use mgic(x) and create the matrix...

meer dan 3 jaar ago

Solved


COUNT LETTERS
Count the number of letters in a given string. For Example: STR='The MAtlAb code'; output:T 2 H 1 E 2 M 1 A 2 L 1 B 1 C ...

meer dan 3 jaar ago

Solved


COUNT VOWEL 2
The objective of this problem is to determine the number of unique vowels used in the given string. Now count vowels in STRI...

meer dan 3 jaar ago

Solved


Power The Product
EXAMPLE: INPUT x=10 & y=10 OUTPUT z=1000000 or, INPUT x=2 & y=3 OUTPUT z= 216 you just need to calculate the product first...

meer dan 3 jaar ago

Solved


Determine the Anti-diagonal of a Magic Square
Determine the anti-diagonal (crossing from top right to lower left) of a magic square of size n. Examples If n = 3 y =...

meer dan 3 jaar ago

Solved


Generate vector according to sign of vector
Generate vector according to sign of vector Example: If A=[-2 0 5] then output must be[-1 0 1] meaning that for negative n...

meer dan 3 jaar ago

Solved


calculate interest saved because of reduction of interest rate
calculate interest saved because of a reduction of interest rate per year (Assuming No leap year) Currently, in India, rate o...

meer dan 3 jaar ago

Solved


Find difference of two set as per example
Find difference of two set as per example Say x=[1:5] and y=[2:6] then, set_diff(x,y) should give output[1] and set_diff(y...

meer dan 3 jaar ago

Solved


Circular Shift Me
Given a vector v=[1 3 6 9 11], circular shift them while iterating m=[1 3 6 9 11; 11 1 3 6 9; 9 11 1 3 6; 6 9 11 1 3; 3 6 9 1...

meer dan 3 jaar ago

Solved


Refresh your system of equations
Given square matrix, and solution vector, find the values of the variables Example: xyz = [1 -1 2; 0 2 5; 4 0 -3]; //x-y+2...

meer dan 3 jaar ago

Solved


Combine the digits to output numbers
input could be of any length e.g. 1. in1 = 1 in2 = 2 output = 12 2. in1 = 2 in2 = 1 in3 = 0 output = 210

meer dan 3 jaar ago

Solved


Recursion at variable input
input of any length a =2 b =2 c =3 output = (a^b)^c = 64

meer dan 3 jaar ago

Solved


Create tangent function out of sin and cos
Please don't use tan(x) directly

meer dan 3 jaar ago

Solved


Back to basics 19 - character types
Covering some basic topics I haven't seen elsewhere on Cody. Return the number of punctuation characters in the input variabl...

meer dan 3 jaar ago

Solved


Tricky timing
Write a function that takes between 0.5 seconds and 0.6 seconds to run.

meer dan 3 jaar ago

Load more