답변 있음
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...

5년 초과 전 | 0

| 수락됨

답변 있음
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);

5년 초과 전 | 0

답변 있음
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...

5년 초과 전 | 2

답변 있음
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...

5년 초과 전 | 0

| 수락됨

답변 있음
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...

5년 초과 전 | 0

| 수락됨

답변 있음
How to plot matrix of ones and zeros as a chessboard?
use the function pcolor

5년 초과 전 | 0

답변 있음
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 ...

5년 초과 전 | 2

| 수락됨

답변 있음
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...

거의 7년 전 | 0

답변 있음
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 ...

거의 7년 전 | 0

답변 있음
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...

거의 7년 전 | 5

문제를 풀었습니다


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

거의 7년 전

문제를 풀었습니다


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

거의 7년 전

문제를 풀었습니다


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

거의 7년 전

문제를 풀었습니다


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

거의 7년 전

문제를 풀었습니다


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.

거의 7년 전

문제를 풀었습니다


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

거의 7년 전

문제를 풀었습니다


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

거의 7년 전

문제를 풀었습니다


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

거의 7년 전

문제를 풀었습니다


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

거의 7년 전

문제를 풀었습니다


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

거의 7년 전

문제를 풀었습니다


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

거의 7년 전

문제를 풀었습니다


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

거의 7년 전

문제를 풀었습니다


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

거의 7년 전

문제를 풀었습니다


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

거의 7년 전

문제를 풀었습니다


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

거의 7년 전

문제를 풀었습니다


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

거의 7년 전

문제를 풀었습니다


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

거의 7년 전

문제를 풀었습니다


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

거의 7년 전

문제를 풀었습니다


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

거의 7년 전