596 total contributions since 2017

Solved

Create an 'arrow-head" matrix

Write a function that when given an odd number, produces an arrow-head function pointing to the right. Examples n = 3 ...

8 dagen ago

Solved

Split a string into chunks of specified length

Given a string and a vector of integers, break the string into chunks whose lengths are given by the elements of the vector. Ex...

8 dagen ago

Solved

Cell Counting: How Many Draws?

You are given a cell array containing information about a number of soccer games. Each cell contains one of the following: * ...

8 dagen ago

Solved

Apply a function array to an array of numbers

It is required to apply a cell array of functions to a numerical array, where the functions accept only scalar inputs. Exampl...

8 dagen ago

Solved

Guess Cipher

Guess the formula to transform strings as follows: 'Hello World!' --> 'Ifmmp Xpsme!' 'Can I help you?' --> 'Dbo J ifmq zpv...

8 dagen ago

Solved

interesting center of magic matrix

output the centre of magic matrix of n input=7; output=25

3 maanden ago

Solved

union without repitition

Let a = [9 9 9 9 9 9 8 8 8 8 7 7 7 6 6 6 5 5 4 2 1] b = [1 1 1 3 3 3 3 3 4 4 4 4 4 10 10 10] Output should be [9 8...

3 maanden ago

Solved

index of n^2 in magic(n)

input=5 magic matrix 17 24 1 8 15 23 5 7 14 16 4 6 13 20 22 10 ...

3 maanden ago

Solved

Alternately upper-lower case

Modify the string to alternate between upper and lower case. For example, s='achyuta' output='AcHyUtA'

3 maanden ago

Solved

most frequent character

Obtain the most frequent character. For example, s='balaram'; output='a'; If there is a tie between letters, return t...

3 maanden ago

Solved

Join Strings with Multiple Different Delimiters

The idea is to form the string S by interleaving the elements of a cell array of strings DELIMITER and another cell array of st...

3 maanden ago

Solved

Find number of days

The input is two date in string format (dd-mm-yyyy) find out the number of days between these two dates. Example: input: ...

3 maanden ago

Solved

Test if a Number is a Palindrome without using any String Operations

*Description* Given an integer _X_, determine if it is a palindrome number. That is, _X_ is equal to the _X_ with the digits ...

3 maanden ago

Solved

High school cafeteria

Given an input vector of positive integers, return a row vector with the primes first (in increasing order) and the composites n...

3 maanden ago

Answered

How to generate a user-defined pulse input from excel at simulink stateflow

You can take a signal builder block and import the excel file into the signal builder from its options. Your pulse input to be ...

How to generate a user-defined pulse input from excel at simulink stateflow

You can take a signal builder block and import the excel file into the signal builder from its options. Your pulse input to be ...

3 maanden ago | 0

Solved

Basic electricity in a dry situation

⚡ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ ⚡ &#...

3 maanden ago

Solved

Building matrices

If you have matrix A, create matrix B using matrix A as an "element" A = [1 2 3 4; 5 6 7 8...

3 maanden ago

Solved

Back to basics 15 - Benchmark

Covering some basic topics I haven't seen elsewhere on Cody. Return an array of the benchmark values for MATLAB.

3 maanden ago

Solved

DC chopper

Input x is the sampled signal vector, may have both AC and DC components. output vector y should have AC components removed then...

3 maanden ago

Solved

Matrix to column conversion

Given a matrix of any size, convert it into a column vector. e.g A=[10 20 30; 40 50 60] then, B = [10; 40; ...

3 maanden ago

Solved

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

3 maanden ago

Solved

UICBioE240 2.10

Given a vector of numbers, give the difference between the maximum and minimum values.

3 maanden ago

Solved

Square the input

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

3 maanden ago

Solved

UICBioE240 problem 1.6

Find the tangent line of a right triangle given the two of the sides. So if A = [1 1] B = sqrt(2)

3 maanden ago

Solved

UICBioE240 problem 1.18

exp(pi/5*i) and exp(pi/5i). Is there any difference in result? Write yes or no as a string.

3 maanden ago

Solved

Matlab Basics - Pick out parts of a vector

Consider x a vector of length >= 7 (there are at least 7 elements in the vector, write a script that extracts the 2nd element, a...

3 maanden ago

Solved

Do you like your boss?

Do you like your boss? Answer can be any string! For example: Boss = 'Do you like your boss?'; Output = 'yes' or ...

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

3 maanden ago