Risolto


Pizza!
Given a circular pizza with radius _z_ and thickness _a_, return the pizza's volume. [ _z_ is first input argument.] Non-scor...

oltre 12 anni fa

Risposto
Some trouble with difference equations
Please try: % Number of time steps: M = 200; % Number of state variables: N = 5; % Pre-allocate data ...

oltre 12 anni fa | 0

Risposto
Add User created Library into Simulink Browser
<http://www.mathworks.com/help/toolbox/simulink/ug/brkl0a6-1.html Adding Libraries to the Library Browser>

oltre 12 anni fa | 0

Risposto
Matrix manipulation
Please try: x = rand(108,1); a = 5; x(end+1) = a; Or: y = [ x ; a ]; HTH.

oltre 12 anni fa | 0

Risolto


Find the sum of the elements in the "second" diagonal
Find the sum of the elements in the diagonal that starts at the top-right corner and ends at the bottom-left corner.

oltre 12 anni fa

Risposto
1st time with matlab and simulink
Please try: Amplitude: 3 Frequency (rad/sec): 2*pi*1000 Phase (rad): pi/2 Sample...

oltre 12 anni fa | 0

Risolto


Find the numeric mean of the prime numbers in a matrix.
There will always be at least one prime in the matrix. Example: Input in = [ 8 3 5 9 ] Output out is 4...

oltre 12 anni fa

Risolto


Eight Queens Solution Checker
Write a function to verify whether an arrangement of queens on a chessboard is a valid solution to the classic <http://en.wikipe...

oltre 12 anni fa

Risolto


Size of this cup?
The given vector has diameter of the cup in mm sampled at micrometer increments in depth from top to bottom, need output in cc a...

oltre 12 anni fa

Risolto


Bottles of beer
Given an input number representing the number of bottles of beer on the wall, output how many are left if you take one down and ...

oltre 12 anni fa

Risposto
Binary to Decimal conversion in Simulink and vice versa
Please see the following pages in the doc: * <http://www.mathworks.com/help/toolbox/comm/ref/bittointegerconverter.html Bit...

oltre 12 anni fa | 4

| accettato

Risolto


collision
several cars (n) were involved in this collision, the input matrix (vm) has n rows and two columns, first column for velocity an...

oltre 12 anni fa

Risolto


Make one big string out of two smaller strings
If you have two small strings, like 'a' and 'b', return them put together like 'ab'. 'a' and 'b' => 'ab' For extra ...

oltre 12 anni fa

Risolto


Sort a list of complex numbers based on far they are from the origin.
Given a list of complex numbers z, return a list zSorted such that the numbers that are farthest from the origin (0+0i) appear f...

oltre 12 anni fa

Risolto


inner product of two vectors
inner product of two vectors

oltre 12 anni fa

Risolto


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

oltre 12 anni fa

Risolto


Return the 3n+1 sequence for n
A Collatz sequence is the sequence where, for a given number n, the next number in the sequence is either n/2 if the number is e...

oltre 12 anni fa

Risolto


Sum all integers from 1 to 2^n
Given the number x, y must be the summation of all integers from 1 to 2^x. For instance if x=2 then y must be 1+2+3+4=10.

oltre 12 anni fa

Risolto


Which quadrant?
Given a complex number, output quadrant 'I' 'II' 'III' or 'IV' | II | I | ...

oltre 12 anni fa

Risolto


Half?
If you toss an even number (x) of coins, what is the probability (y) of 50% head and 50% tail?

oltre 12 anni fa

Risolto


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

oltre 12 anni fa

Risolto


Project Euler: Problem 1, Multiples of 3 and 5
If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23...

oltre 12 anni fa

Risolto


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

oltre 12 anni fa

Risolto


So many choices
For inputs _n_ and _k_ (in that order), output the number of ways that k objects can be chosen from amongst n distinct objects. ...

oltre 12 anni fa

Risolto


The Tower of Hanoi
In the <http://en.wikipedia.org/wiki/Tower_of_Hanoi Tower of Hanoi problem> with 3 rods (1, 2 & 3), the goal is to move a tower ...

oltre 12 anni fa

Risolto


Love triangles
Given a vector of lengths [a b c], determines whether a triangle with non-zero area (in two-dimensional Euclidean space, smarty!...

oltre 12 anni fa

Risolto


First N Perfect Squares
*Description* Return the first N perfect squares *Example* input = 4; output = [ 1 4 9 16 ];

oltre 12 anni fa

Risolto


Roll the Dice!
*Description* Return two random integers between 1 and 6, inclusive, to simulate rolling 2 dice. *Example* [x1,x2] =...

oltre 12 anni fa

Risolto


Distance walked 1D
Suppose you go from position 7 to 10 to 6 to 4. Then you have walked 9 units of distance, since 7 to 10 is 3 units, 10 to 6 is 4...

oltre 12 anni fa

Risolto


Too mean-spirited
Find the mean of each consecutive pair of numbers in the input row vector. For example, x=[1 2 3] ----> y = [1.5 2.5] x=[1...

oltre 12 anni fa

Carica altro