Risolto


07 - Common functions and indexing 5
Create the vector _lin_: <<http://samle.dk/STTBDP/Assignment1_7e.png>> (the integers from 1 to 20) Make every other val...

quasi 8 anni fa

Risolto


Change the first and last diagonal element of the identity matrix to zero
Starting with the identity matrix, change first and last diagonal element to zero. Example If n=5 A = 0 0 ...

quasi 8 anni fa

Risolto


04 - Scalar Equations 3
Define the variables a, b, and c: <<http://samle.dk/STTBDP/Assignment1_4-a.png>> <<http://samle.dk/STTBDP/Assignment1_4-b....

quasi 8 anni fa

Risolto


07 - Common functions and indexing 3
Define _eMat_: <<http://samle.dk/STTBDP/Assignment1_3e.png>> Create the variable _eMat2_, which is equal to _eMat_ with th...

quasi 8 anni fa

Risolto


Reverse a string
Reverse the given string. Example input = 'reverse' output = 'esrever'

quasi 8 anni fa

Risolto


Check for keywords
If the entered string is a MATLAB keyword, return true else false

quasi 8 anni fa

Risolto


The prisoner
"We want information, information, information." "Who are you?" Input can be a string or a number (array).

quasi 8 anni fa

Risolto


No Twins?
Write a function that accepts as input a vector and returns the same vector, but retaining only the first occurrence of an eleme...

quasi 8 anni fa

Risolto


Find out missing number from a vector of 9 elements
You are given a vector of size 9, x = [x1 x2 x3 x4 x5 x6 x7 x8 x9] Elements of x may be randomly selected without repeati...

quasi 8 anni fa

Risolto


07 - Common functions and indexing 4
Define the matrix _cMat_: <<http://samle.dk/STTBDP/Assignment1_3c.png>> ( _cMat_ = 10x10 matrix where the numbers from 1 t...

quasi 8 anni fa

Risolto


Calculate square and cube of number
Calculate square and cube of number x

quasi 8 anni fa

Risolto


All capital?
Are all the letters in the input string capital letters? Examples: 'MNOP' -> 1 'MN0P' -> 0

quasi 8 anni fa

Risolto


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

quasi 8 anni fa

Risolto


Resizing Matrices
Take an 4x3 matrix, and resize it to a 2x6 matrix

quasi 8 anni fa

Risolto


Generate the Matrix!
Given n, generate the following matrix: a = [ n n-1 n-2 ... 2 1; n-1 n-1 n-2 ... 2 1; n-2 n-2 n-2 ... 2 1;...

quasi 8 anni fa

Risolto


ASCII sum of phrases
Find the sum of the numeric equivalents of all characters entered in a phrase. For example: for the phrase 'My name is test', th...

quasi 8 anni fa

Risolto


The answer to life the universe and everything
Write a function that gives the answer to life the universe and everything to every input except the input is 42. In this case t...

quasi 8 anni fa

Risolto


Find parts of a circle.
Given radius (r) of a circle find the diameter (d), circumference (c), an area (a).

quasi 8 anni fa

Risolto


find the roots of a quadratic equation
for e.g x = [ 2 -1 -3] y = [1.5 -1]

quasi 8 anni fa

Risolto


square root
Find the square root (y) of an input (x).

quasi 8 anni fa

Risolto


vector to string
Determine what the ASCII characters spell out. Example: input = [ 72 73 71 72] output = 'HIGH'

quasi 8 anni fa

Risolto


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

quasi 8 anni fa

Risolto


Convert yards to feet
The goal of this script is to convert a value given in yards to feet.

quasi 8 anni fa

Risolto


Matlab Basics II - Create a vector with a repeated entry
Create a row vector of length n, filled with 4's, for example, if n = 3 output = [4 4 4] make sure to round UP when n is a...

quasi 8 anni fa

Risolto


Make a Palindrome Number
Some numbers like 323 are palindromes. Other numbers like 124 are not. But look what happens when we add that number to a revers...

quasi 8 anni fa

Risolto


Find the palindrome
Given the string a, find the longest palindromic sub-string b. So when a = 'xkayakyy'; you should return b = 'kayak';

quasi 8 anni fa

Risolto


Alternating sum
Given vector x, calculate the alternating sum y = x(1) - x(2) + x(3) - x(4) + ...

quasi 8 anni fa

Risolto


Replace values under a limit
For a vector x and number n, the goal is to find every element of x inferior to n and replace it by n. Example x= [ 1 2 3...

quasi 8 anni fa

Risolto


Values in Array
How many values are in the array

quasi 8 anni fa

Risolto


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

quasi 8 anni fa

Carica altro