Community Profile

Jos (10584)

Last seen: 11개월 전 2006년부터 활동

Followers: 0   Following: 0

I have been using Matlab since version 4 (1999 or so) and still prefer it over all other software tools available for data manipulation :-) My professional interests: neuroscience (motor control & eye movements), cognitive psychology physics, mathematics, teaching "The most important part of programming is writing the comments!"

All

배지 보기

Feeds

보기 기준

문제를 풀었습니다

Back to Basics - Find no. of elements in a matrix?
Let A be a m*n matrix. Find the total no. of elements in A ? (Hint - formula based) A = [1 2 3;4 5 6]; output = 6

4년 초과 전

문제를 풀었습니다

Find all elements less than 0 or greater than 10 and replace them with NaN
Given an input vector x, find all elements of x less than 0 or greater than 10 and replace them with NaN. Example: Input ...

6년 초과 전

문제를 풀었습니다

Column Removal
Remove the nth column from input matrix A and return the resulting matrix in output B. So if A = [1 2 3; 4 5 6]; and ...

6년 초과 전

문제를 풀었습니다

Given a and b, return the sum a+b in c.

6년 초과 전

문제를 풀었습니다

Is this is a Tic Tac Toe X Win?
For the game of <https://en.wikipedia.org/wiki/Tic-tac-toe Tic Tac Toe> we will be storing the state of the game in a matrix M. ...

6년 초과 전

문제를 풀었습니다

surrounded matrix
With a given matrix A (size m x n) create a matrix B (size m+2 x n+2) so that the matrix A is surrounded by ones: A = [1 2 ...

6년 초과 전

문제를 풀었습니다

Back to basics 21 - Matrix replicating
Covering some basic topics I haven't seen elsewhere on Cody. Given an input matrix, generate an output matrix that consists o...

6년 초과 전

문제를 풀었습니다

How to subtract?
* Imagine you need to subtract one number from another using MATLAB. * You will not be using eval for this task. * Given two A...

6년 초과 전

문제를 풀었습니다

Is my wife right?
Regardless of input, output the string 'yes'.

7년 초과 전

문제를 풀었습니다

Fibonacci sequence
Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: Inpu...

거의 9년 전

문제를 풀었습니다

Back to basics 6 - Column Vector
Covering some basic topics I haven't seen elsewhere on Cody. Given an input vector, output true or false whether it is a colu...

대략 10년 전

문제를 풀었습니다

Negative matrix
Change the sign of all elements in given matrix.

거의 11년 전

문제를 풀었습니다

Swap the first and last columns
Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becomes the first. All oth...

11년 초과 전

문제를 풀었습니다

Which values occur exactly three times?
Return a list of all values (sorted smallest to largest) that appear exactly three times in the input vector x. So if x = [1 2...

11년 초과 전

문제를 풀었습니다

Reindex a vector
You are given two vectors of equal length. Vector N has numeric values (no Inf or NaN) while vector IDX has integers. Place th...

거의 12년 전

문제를 풀었습니다

Angle between two vectors
You have two vectors , determine the angle between these two vectors For example: u = [0 0 1]; v = [1 0 0]; The a...

대략 12년 전

문제를 풀었습니다

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

대략 12년 전

문제를 풀었습니다

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

대략 12년 전

문제를 풀었습니다

How to find the position of an element in a vector without using the find function
Write a function posX=findPosition(x,y) where x is a vector and y is the number that you are searching for. Examples: fin...

대략 12년 전

문제를 풀었습니다

Target sorting
Sort the given list of numbers |a| according to how far away each element is from the target value |t|. The result should return...

대략 12년 전

문제를 풀었습니다

Back and Forth Rows
Given a number n, create an n-by-n matrix in which the integers from 1 to n^2 wind back and forth along the rows as shown in the...

대략 12년 전

문제를 풀었습니다

Binary numbers
Given a positive, scalar integer n, create a (2^n)-by-n double-precision matrix containing the binary numbers from 0 through 2^n...

대략 12년 전

문제를 풀었습니다

Right and wrong
Given a vector of lengths [a b c], determines whether a triangle with those sides lengths is a right triangle: <http://en.wikipe...

대략 12년 전

문제를 풀었습니다

Check if sorted
Check if sorted. Example: Input x = [1 2 0] Output y is 0

대략 12년 전

문제를 풀었습니다

Create times-tables
At one time or another, we all had to memorize boring times tables. 5 times 5 is 25. 5 times 6 is 30. 12 times 12 is way more th...

대략 12년 전

문제를 풀었습니다

Finding Perfect Squares
Given a vector of numbers, return true if one of the numbers is a square of one of the other numbers. Otherwise return false. E...

대략 12년 전

문제를 풀었습니다

Find the sum of all the numbers of the input vector
Find the sum of all the numbers of the input vector x. Examples: Input x = [1 2 3 5] Output y is 11 Input x ...

대략 12년 전

문제를 풀었습니다

The Hitchhiker's Guide to MATLAB
Output logical "true" if the input is the answer to life, the universe and everything. Otherwise, output logical "false".

대략 12년 전

문제를 풀었습니다

Magic!
Check whether the input matrix is a normal magic square: <http://en.wikipedia.org/wiki/Magic_square> Output the logical va...

대략 12년 전

문제를 풀었습니다

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

대략 12년 전