A résolu


Implement full adder circuit
Implement full adder circuit (Full Adder) Inputs signals are a, b and cin. Output signal y = [cout sum]

environ 2 mois il y a

A résolu


Program an exclusive OR operation with logical operators
Program an exclusive or operation *without* using the MATLAB function xor. Use logical operators like |, &, ~, ... instead. ...

environ 2 mois il y a

A résolu


Extract Increasing Integers from Digit String
Given a string containing only digits, the function get_integers should return the list of increasing integers obtained by readi...

environ 2 mois il y a

A résolu


Swap Red and Blue

environ 2 mois il y a

A résolu


Ring Matrix
Given n (only odd), return output matrix a that has concentric rings of the numbers 1 through (n+1)/2 around the center point. ...

environ 2 mois il y a

A résolu


Namespace
Create a set of n variable names 'a_1',...,'a_n' The result should be a column oriented cell array of strings. Example inp...

environ 2 mois il y a

A résolu


Airline Ticket Mod7 Checksum
There are 13 digits in an airline ticket number. If an airline ticket number is valid, the 13th digit should be the remainder of...

environ 2 mois il y a

A résolu


MATLAB 101: Find alternating sum
Given an array, find alternating sum i.e. – y = x (1) – x (2) + x (3) – x (4) + x (5) - …

2 mois il y a

A résolu


Convert a diagonal representation of a matrix element to linear index or subscripts
Elements in matrices in MATLAB can be retrieved by linear index or subscripts. For example, the 1 in the matrix below has a line...

2 mois il y a

A résolu


Pascal's Pyramid - A Variation with an Arial View
Let's create a matrix of size N x N containing a Pascal's Triangle in each quadrant that diverges from the centre to form an ari...

2 mois il y a

A résolu


First Unique Character
Given a character vector s, return the first character that appears exactly once in s. If every character repeats at least once...

2 mois il y a

A résolu


Possible Outcomes of American Roulette
The payout for American roulette can be calculated by: payout = (38/n)-1 where n is the number of squares the bet covers. ...

2 mois il y a

A résolu


Sieve of Eratosthenes - 02
"Sift the Two's and Sift the Three's, The Sieve of Eratosthenes. When the multiples sublime, The numbers that remain a...

2 mois il y a

A résolu


Reproduce this plot!
Write a function that will take a dataset (x,y), a best fit model (model), and the upper and lower prediction bounds (lb,ub) for...

2 mois il y a

A résolu


Plotting Practice
Plot cos(x) vs x as shown in the figure below. Include the appropriate title, x-label, and y-label. Note, it is case sensitive. ...

2 mois il y a

A résolu


Back to basics 13 - Input variables
Covering some basic topics I haven't seen elsewhere on Cody. Return as a string the name of the input variable to the functio...

2 mois il y a

A résolu


Robust Main Diagonal Sum with Special Value Handling in Arrays
Compute the sum of the diagonal elements of an array (vector or matrix). If array is not square return the char array: 'no-squa...

2 mois il y a

A résolu


MATLAB 101: Reverse a Vector
Write a MATLAB function that takes a 1D vector (either a row or a column vector) and returns the vector with its elements in exa...

2 mois il y a

A résolu


MATLAB 101: Extracting Even/Odd Values
Given an array or a matrix, extract all elements that satisfy a specified parity condition ('even' or 'odd') and return them as ...

2 mois il y a

A résolu


Is the Matrix Square?
Write a function that determines whether the input matrix x is square. Return true if x has the same number of rows and columns...

2 mois il y a

A résolu


Rumis Scorer 1
<http://en.wikipedia.org/wiki/Rumis Rumis> is a multiplayer 3D block board game where the goal is to have the most squares visib...

2 mois il y a

A résolu


Rumis Scorer 3
<http://en.wikipedia.org/wiki/Rumis Rumis> is a multiplayer 3D block board game where the goal is to have the most squares visib...

2 mois il y a

A résolu


Sum of Elements Above the Main Diagonal of a Square Matrix
Given a square matrix as input, write a function that returns the sum of all elements above the main diagonal. If the input mat...

2 mois il y a

A résolu


MATLAB 101: Student Marks Analyzer
An array is given that contains the marks received by a group of students in their class test. Write a function that processes t...

2 mois il y a

A résolu


Show me the shape of your array
Write a function that determines the shape of the input array x: Return 'square' if x has the same number of rows and colum...

2 mois il y a

A résolu


Wrap a vector, but insert NaN's at the wrap-positions.
When you plot a line that wraps, and do not want the sawtooth shape to show up in the plot, you can either draw all separate lin...

2 mois il y a

A résolu


Only once: cleaning up your columns
We have a logical array (with ones and zeroes). It is simple: after processing every column may only contain a single true value...

2 mois il y a

A résolu


MATLAB 101: Count the Evens
Write a MATLAB function that accepts an array of integers and returns the total count of even numbers present in the array. Note...

2 mois il y a

A résolu


Draw 'W'
For any given n, return a matrix of height n and width 4n-3 containing a W of ones. Example: n=2 ans= [1 0 1 0 1 0 1 0 1 0...

2 mois il y a

A résolu


Limiting Element Occurrences
You are given a list 'v' of numbers. This list may contain repeated numbers. Your objective is to create a new list that maintai...

2 mois il y a

Charger plus