Risolto

Calculate the mean of each half of a matrix

Given a matrix with an even number of columns, n, return a 1-by-2 row vector where the first element is the mean of all the elem...

oltre un anno fa

Risolto

Calculate the probability that at least two people in a group share the same birthday.

Calculate the probability that at least two people in a group share the same birthday. Given an integer input n, return to 0.015...

oltre 2 anni fa

Risolto

Number of 1s in a binary string

Find the number of 1s in the given binary string. Example. If the input string is '1100101', the output is 4. If the input stri...

oltre 2 anni fa

Risolto

Select every other element of a vector

Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...

oltre 2 anni fa

Risolto

Getting the indices from a vector

This is a basic MATLAB operation. It is for instructional purposes. --- You may already know how to <http://www.mathworks....

oltre 2 anni fa

Risolto

Magic is simple (for beginners)

Determine for a magic square of order n, the magic sum m. For example m=15 for a magic square of order 3.

oltre 2 anni fa

Risolto

Make a random, non-repeating vector.

This is a basic MATLAB operation. It is for instructional purposes. --- If you want to get a random permutation of integer...

oltre 2 anni fa

Risolto

Return the first and last characters of a character array

Return the first and last character of a string, concatenated together. If there is only one character in the string, the functi...

oltre 2 anni fa

Risolto

Check if number exists in vector

Return 1 if number _a_ exists in vector _b_ otherwise return 0. a = 3; b = [1,2,4]; Returns 0. a = 3; b = [1,...

oltre 2 anni fa

Risolto

Generate a vector like 1,2,2,3,3,3,4,4,4,4

Generate a vector like 1,2,2,3,3,3,4,4,4,4 So if n = 3, then return [1 2 2 3 3 3] And if n = 5, then return [1 2 2...

oltre 2 anni fa

Risolto

Maximum value in a matrix

Find the maximum value in the given matrix. For example, if A = [1 2 3; 4 7 8; 0 9 1]; then the answer is 9.

oltre 2 anni fa

Risolto

Remove the polynomials that have positive real elements of their roots.

The characteristic equation for a dynamic system is a polynomial whose roots indicate its behavior. If any of the roots of the p...

oltre 2 anni fa

Risolto

Find state names that start with the letter N

Given a list of US states, remove all the states that start with the letter N. If s1 = 'Alabama Montana Nebraska Vermont Ne...

oltre 2 anni fa

Risolto

Get the area codes from a list of phone numbers

Given a string of text with phone numbers in it, return a unique'd cell array of strings that are the area codes. s = '508-647...

oltre 2 anni fa

Risolto

Finding Perfect Squares

Given a vector of numbers, return true if one of the numbers is a square of one of the numbers. Otherwise return false. Example...

oltre 2 anni fa

Risolto

The Piggy Bank Problem

Given a cylindrical piggy bank with radius g and height y, return the bank's volume. [ g is first input argument.] Bonus though...

oltre 2 anni fa

Risolto

Test of Quiz

Answer the questions and write in vector. Only one answer is correct. The founder of fuzzy logic is 1a) D. Golberg 1b)...

quasi 3 anni fa

Risolto

Hard limit function

Classify x data as if x>=0 then y=1 if x<0 then y=0 Example x = [ -2 -1 0 1 2] y = [ 0 0 1 1 1]

circa 3 anni fa

Risolto

Is X a Fibonacci Matrix?

In honor of Cleve's new blog and post: <http://blogs.mathworks.com/cleve/2012/06/03/fibonacci-matrices/> Is X a Fibonacci ...

circa 3 anni fa

Inviato

barrier_grid_animation

Barrier grid animation is an effect created by moving a striped transparent overlay across an interlaced image. This file create...

oltre 3 anni fa | 1 download |

Risolto

Length of the hypotenuse

Given short sides of lengths a and b, calculate the length c of the hypotenuse of the right-angled triangle. <<https://i.imgu...

oltre 3 anni fa

Risposto

Finding the t values of the Student's t test (t1-α,ν)

The t-value is inside the STAT structure, consider the following example: X = rand([100, 1]); Y = rand([100, 1]); [H,P,CI,STA...

Finding the t values of the Student's t test (t1-α,ν)

The t-value is inside the STAT structure, consider the following example: X = rand([100, 1]); Y = rand([100, 1]); [H,P,CI,STA...

circa 4 anni fa | 0

Risposto

Plotting 2 lines in the same graph

Modify the last lines of your code: disp(['Time taken to reach ground (with NO drag) = ', num2str(t), ' seconds']) disp(['Tota...

Plotting 2 lines in the same graph

Modify the last lines of your code: disp(['Time taken to reach ground (with NO drag) = ', num2str(t), ' seconds']) disp(['Tota...

circa 4 anni fa | 0

Risposto

plotting frequency distribution of fft2 transformed image...

I believe that the following example may be useful: % spatial frequency (SF) filtering clear; close all; clc; filename = 'ima...

plotting frequency distribution of fft2 transformed image...

I believe that the following example may be useful: % spatial frequency (SF) filtering clear; close all; clc; filename = 'ima...

circa 4 anni fa | 0

Inviato

modularArithmetic

Modular arithmetic or modulo multiplication circle

oltre 4 anni fa | 1 download |

Inviato

Implementation of the Vancouver Raman Algorithm

Implementation of the Vancouver Raman Algorithm

oltre 4 anni fa | 7 download |

Risolto

Interpolator

You have a two vectors, a and b. They are monotonic and the same length. Given a value, va, where va is between a(1) and a(end...

oltre 4 anni fa

Risolto

Kaprekar Steps

6174 is the <http://en.wikipedia.org/wiki/6174_%28number%29 Kaprekar constant>. All natural numbers less than 10,000 (except som...

oltre 4 anni fa

Risolto

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

oltre 4 anni fa