Risolto


MATLAB Basic: rounding IV
Do rounding towards plus infinity. Example: -8.8, answer -8 +8.1 answer 9 +8.50 answer 9

quasi 10 anni fa

Risolto


MATLAB Basic: rounding
Do rounding near to zero Example: -8.8, answer -8 +8.1 answer 8

quasi 10 anni fa

Risolto


determine the sum of the squares
if x = 4, the solution will be: y = 1^2+2^2+3^2+4^2=1+4+9+16 = 30.

quasi 10 anni fa

Risolto


Spot the outlier
All points except for one lie on a line. Which one is the outlier? Example: You are given a list of x-y pairs in a column ...

quasi 10 anni fa

Risolto


How long is the longest prime diagonal?
Stanislaw Ulam once observed that if the counting numbers are <http://en.wikipedia.org/wiki/Ulam_spiral arranged in a spiral>, t...

quasi 10 anni fa

Risolto


Close MATLAB with keyboard
Close MATLAB with keyboard without using mouse

quasi 10 anni fa

Risolto


Perform the division
The dividend is given as 18,the divisor given as 9

quasi 10 anni fa

Risolto


Matrix multiplication across rows
Given matrix m, return matrix n such that, rows of n are result of multiplication of the rows of the input matrix Example ...

quasi 10 anni fa

Risolto


Check if a rotated array was originally sorted
Suppose a sorted array is rotated at some pivot unknown to you. For example, |[0 1 2 4 5 6 7]| might become |[5 6 7 0 1 2 4]|. ...

quasi 10 anni fa

Risolto


Determine the input for these two numbers.
function c=add_together(a,b) a=12345678; b=87654321; end

quasi 10 anni fa

Risolto


Converting binary to decimals
Convert binary to decimals. Example: 010111 = 23. 110000 = 48.

quasi 10 anni fa

Risolto


Find the quantization index of an analog value using a 6-bit quantizer.
Given a sinusoidal waveform x(t)=4.5*sin(2*pi*100*t) is sampled at 8000 sample per second. Assume that signal range is between -...

quasi 10 anni fa

Risolto


a column vector to a row vector
Write a script to convert a column (e.g. x = [1; 2; 3]) to a row (e.g. y = [1 2 3]), your script should be able to do this for a...

quasi 10 anni fa

Risolto


the odd elements
Write a function which extracts all the odd elements. example input: x = [1 8 9 45 -2 4] output: y = [1 9 -2]

quasi 10 anni fa

Risolto


a vector with a repeated entry
Create a row vector of length x, filled with 7's, for example, if x = 5 output = [7 7 7 7 7] make sure to round UP when x ...

quasi 10 anni fa

Risolto


complex numbers
For complex number z=a+bi, write code that will multiply a and b together.

quasi 10 anni fa

Risolto


rounding
Round 5.46 and make 'y' equal to that number.

quasi 10 anni fa

Risolto


square root
Write a script that returns the square root of the elements in x. e.g. x = [1 4 9 16] --> y = [1 2 3 4]

quasi 10 anni fa

Risolto


the difference of cubes
Given a and b, return the difference of cubes a^3 - b^3 in c.

quasi 10 anni fa

Risolto


intervals
Write a function that takes an interval from a to b, and divides it into 6 parts.

quasi 10 anni fa

Risolto


length of a vector
Find three times the length of a given vector.

quasi 10 anni fa

Risolto


subtract two numbers
Given a and b, return the difference a-b in c.

quasi 10 anni fa

Risolto


ascii
Using matlab, give the symbol that is associated with ASCii code 101.

quasi 10 anni fa

Risolto


the length of a given vector
Given a vector x, the output y should equal the length of x.

quasi 10 anni fa

Risolto


transpose of matrix
Given a vector x, the output y should equal the transpose of x.

quasi 10 anni fa

Risolto


extract the fifth through the last elements
For any vector x, write a function that extracts the fifth through the last elements.

quasi 10 anni fa

Risolto


counting down
Create a vector that counts from 1000 to 400 in increments of 50.

quasi 10 anni fa

Risolto


perimeter of a circle
Given the radius x, y would be the perimeter of a circle.

quasi 10 anni fa

Risolto


Celsius to Kelvin
Convert Celsius degrees to Kelvin temperature.

quasi 10 anni fa

Risolto


Project Euler: Problem 7, Nth prime
By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13. What is the Nth prime nu...

quasi 10 anni fa

Carica altro