Solved


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

bijna 4 jaar ago

Solved


Make a checkerboard matrix
Given an integer n, make an n-by-n matrix made up of alternating ones and zeros as shown below. The a(1,1) should be 1. Examp...

bijna 4 jaar ago

Solved


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

bijna 4 jaar ago

Solved


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

bijna 4 jaar ago

Solved


Flip the vector from right to left
Flip the vector from right to left. Examples x=[1:5], then y=[5 4 3 2 1] x=[1 4 6], then y=[6 4 1]; Request not ...

bijna 4 jaar ago

Solved


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

bijna 4 jaar ago

Solved


Times 2 - START HERE
Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

bijna 4 jaar ago

Answered
I have a row of 1308 values and I need the total every 12 rows. So I need the sum of rows 1-12 and then again for the next 12 numbers
Maybe you can use reshape and sum function. For example: a = rand(1, 1000); % this create a rand vector of 1000 dims b = resh...

ongeveer 4 jaar ago | 0

| accepted