A répondu
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...

environ 5 ans il y a | 0

| A accepté

A répondu
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);

environ 5 ans il y a | 0

A répondu
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...

environ 5 ans il y a | 2

A répondu
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...

environ 5 ans il y a | 0

| A accepté

A répondu
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...

environ 5 ans il y a | 0

| A accepté

A répondu
How to plot matrix of ones and zeros as a chessboard?
use the function pcolor

environ 5 ans il y a | 0

A répondu
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 ...

environ 5 ans il y a | 2

| A accepté

A répondu
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...

environ 6 ans il y a | 0

A répondu
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 ...

environ 6 ans il y a | 0

A répondu
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...

plus de 6 ans il y a | 4

A résolu


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

plus de 6 ans il y a

A résolu


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

plus de 6 ans il y a

A résolu


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

plus de 6 ans il y a

A résolu


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

plus de 6 ans il y a

A résolu


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.

plus de 6 ans il y a

A résolu


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

plus de 6 ans il y a

A résolu


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

plus de 6 ans il y a

A résolu


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

plus de 6 ans il y a

A résolu


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

plus de 6 ans il y a

A résolu


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

plus de 6 ans il y a

A résolu


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

plus de 6 ans il y a

A résolu


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

plus de 6 ans il y a

A résolu


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

plus de 6 ans il y a

A résolu


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

plus de 6 ans il y a

A résolu


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

plus de 6 ans il y a

A résolu


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

plus de 6 ans il y a

A résolu


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

plus de 6 ans il y a

A résolu


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

plus de 6 ans il y a

A résolu


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

plus de 6 ans il y a