Answered
How do you plot data bi-monthly for the course of a year?
You may use the function datetime to set the lower and upper dates of each bi-monthly period. Then using find to selectively cho...

ongeveer een jaar ago | 0

| accepted

Answered
How can I write code that multiplies one transition matrices by the different products of two matrixes?
You can use the power ^ operator: g = group1_transition*group1_distribution*(group1_transition^4);

ongeveer een jaar ago | 0

Answered
How to calculate the peak areas of every single peak from the mass spectrum?
The function findpeaks can find the peak values and locations. data = importdata('Example.txt'); plot(data); [pks,loc] = fin...

ongeveer een jaar ago | 2

Answered
How can I compare the values of different columns of the same matrix
Basically, the function input with the argument 's' returns a char array (string), you need to convert it into vector of numbers...

ongeveer een jaar ago | 0

| accepted

Answered
Write a file starting in column 7.
If your data is in csv format, you can use the command csvwrite with row and col parameters as follows: row = 0; col = 6; % ro...

ongeveer een jaar ago | 0

| accepted

Answered
How to plot matrix of ones and zeros as a chessboard?
use the function pcolor

ongeveer een jaar ago | 0

Answered
How to add a column to an existing file?
I belelive you are trying to add a column of A to the file so your new file will be like this: %--Existing file -- -- A -- 4 ...

ongeveer een jaar ago | 2

| accepted

Answered
Create a single for loop for multiple conditions
I suggest you use switch statement like this: Boat_Speed=40; % set the following variable based on the current water con...

meer dan 2 jaar ago | 0

Answered
Undefined operator '-' for input arguments of type 'cell'.
I would suggest that you make sure that the both sigT_C{1,1} and recapT_C{1,1} are matrices. You can try this code and check if ...

meer dan 2 jaar ago | 0

Answered
how can I find the rows with l non zero elements in a matrix? (vital)
You can do it this way: q = r > 0; find(sum(q,2)==1) you can replace the 1 with any count you want of the number of no...

meer dan 2 jaar ago | 1

Solved


The twelve days of Christmas
Traditionally there are twelve days of Christmas to celebrate ("Twelvetide"), typically starting with Christmas Day (25 December...

meer dan 2 jaar ago

Solved


Increasing sub-sequence (Level 2)
This is the next step up from <http://www.mathworks.com/matlabcentral/cody/problems/42837-increasing-sub-sequence-level-1 Proble...

meer dan 2 jaar ago

Solved


Great Circle Distance
Find shortest between two points on a ball given their azimuthal and polar angles (in degrees) as well as the radius of the sphe...

meer dan 2 jaar ago

Solved


Are you in or are you out?
Given vertices specified by the vectors xv and yv, and a single point specified by the numbers X and Y, return "true" if the poi...

meer dan 2 jaar ago

Solved


Distance walked 2D
Suppose you go from x-y coordinates [3,4] to [0,0] to [0,1] to [1,1], then you walked 7 units of distance.

meer dan 2 jaar ago

Solved


Return elements unique to either input
Given two numeric inputs a and b, return a row vector that contains the numbers found in only a or only b, but not both. For ex...

meer dan 2 jaar ago

Solved


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

meer dan 2 jaar ago

Solved


Elapsed Time
Given two date strings d1 and d2 of the form yyyy/mm/dd HH:MM:SS (assume hours HH is in 24 hour mode), determine how much time, ...

meer dan 2 jaar ago

Solved


Who Has the Most Change?
You have a matrix for which each row is a person and the columns represent the number of quarters, nickels, dimes, and pennies t...

meer dan 2 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...

meer dan 2 jaar ago

Solved


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

meer dan 2 jaar ago

Solved


Triangle Numbers
Triangle numbers are the sums of successive integers. So 6 is a triangle number because 6 = 1 + 2 + 3 which can be displa...

meer dan 2 jaar ago

Solved


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

meer dan 2 jaar ago

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

meer dan 2 jaar ago

Solved


Determine if input is odd
Given the input n, return true if n is odd or false if n is even.

meer dan 2 jaar ago

Solved


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

meer dan 2 jaar ago

Solved


Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...

meer dan 2 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:...

meer dan 2 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 ...

meer dan 2 jaar ago