Resuelto


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

casi 9 años hace

Resuelto


Matlab Basics - Set unwanted parts of a vector to zero
Consider a vector x, of length >= 7, write a script to set elements 2, 5, and 6 to zero. Example x = [1 2 3 4 5 6 7] --> ...

casi 9 años hace

Resuelto


Number of digits in an integer
Specifies how many digits in a given integer. Example: in=100 ==> out=3

casi 9 años hace

Resuelto


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

casi 9 años hace

Resuelto


MATLAB Basic: rounding II
Do rounding nearest integer. Example: -8.8, answer -9 +8.1 answer 8 +8.50 answer 9

casi 9 años hace

Resuelto


Matlab Basics II - Extract last 3 elements of a vector
Let x be a vector of unknown length, we are always interested in the last 3 numbers in the vector, write a function that gives t...

casi 9 años hace

Resuelto


Compute LOG(1+X) in natural log
Compute LOG(1+X) in natural log

casi 9 años hace

Resuelto


Create a function handle that reverses the input arguments of another function handle
Given a function that takes two input arguments and returns one output, create another function handle that performs the same op...

casi 9 años hace

Resuelto


Back to basics 7 - Equal NaNs
Covering some basic topics I haven't seen elsewhere on Cody. Given 2 input variables, output true if they are equal, false ot...

casi 9 años hace

Resuelto


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

casi 9 años hace

Resuelto


Calculate the derivative of a polynomial
Example: in = [ 1 1 1 ] out = [ 2 1 ]

casi 9 años hace

Resuelto


Skip by a multiple
Given an integer create an array of its multiples. Array must have a length of 15

casi 9 años hace

Resuelto


Getting logical indexes
This is a basic MATLAB operation. It is for instructional purposes. --- Logical indexing works like this. thresh = 4...

casi 9 años hace

Resuelto


N-Cards Problem
You have a deck of _N_ cards numbered in order from 1 to _N_. You discard the top card (card 1) and place the next card (card 2)...

casi 9 años hace

Resuelto


Mode
Find the mode of the vector Assumption: no vector is bimodal Example 1: input=[1 2 3 4 4]; output=4 Example 2: input=[7...

casi 9 años hace

Resuelto


Duplicate each element of a vector.
for an n-dimensional vector x, the function should return another vector 2n-dimension which each element is repeated twice. Ex...

casi 9 años hace

Resuelto


Count decimal digits of a number
* Given an integer number you have to return the number of its digits. * For example 248 has 3 digits and 1589 has 4 digits ...

casi 9 años hace

Resuelto


Box!
Given a box, find the volume of the cube. With each side = a.

casi 9 años hace

Resuelto


Remove the Zero
Given an array n, remove all zeros

casi 9 años hace

Resuelto


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

casi 9 años hace

Resuelto


Try 1.5.4: Celsius to Fahrenheit
Write a program to convert an input given in Celsius to Fahrenheit. Examples: Input celsiusValue = 100 Output fahrValu...

casi 9 años hace

Resuelto


Test if two numbers have the same digits
Given two integers _x1_ and _x2_, return |true| if the numbers written with no leading zeros contain the same digits. That is, t...

casi 9 años hace

Resuelto


Is it an Armstrong number?
An Armstrong number of three digits is an integer such that the sum of the cubes of its digits is equal to the number itself. Fo...

casi 9 años hace

Resuelto


MATCH THE STRINGS (2 CHAR) very easy
Match the given string based on first two characters on each string. For example A='harsa'; b='harish'; result '1' ...

casi 9 años hace

Resuelto


The Goldbach Conjecture, Part 2
The <http://en.wikipedia.org/wiki/Goldbach's_conjecture Goldbach conjecture> asserts that every even integer greater than 2 can ...

casi 9 años hace

Resuelto


Encode Roman Numerals
Create a function taking a non-negative integer as its parameter and returning a string containing the Roman Numeral representat...

casi 9 años hace

Resuelto


pressure to dB?
given x ratio of pressure, find corresponding y dB

casi 9 años hace

Resuelto


05 - Vector Equations 2
Define the vectors _aVec_ and _bVec_: <<http://samle.dk/STTBDP/Assignment1_2a.png>> and <<http://samle.dk/STTBDP/Assig...

casi 9 años hace

Resuelto


Back to basics 9 - Indexed References
Covering some basic topics I haven't seen elsewhere on Cody. Given an input matrix and row and column, output the index of th...

casi 9 años hace

Resuelto


Create incrementing array
Given a and b generate an output matrix as shown in following examples: a=2 b=5 output=[2 20 200 2000 20000] a=4 b...

casi 9 años hace

Cargar más