Answered
How to increase yticklabel?
Change the y-limits ylim([1 5]) %or more than 5, whatever value is preferable

3 years ago | 0

| accepted

Answered
How to delete a row if the value of a certain cell in a table is less than the first cell? and then carry out the same condition for the cell after it again.
%random data for example y=rand(10,2) %index of rows that don't satisfy the constraint idx=find(y(2:end,2)<=y(1,2))+1 %delet...

3 years ago | 1

| accepted

Answered
I want make a (t,h)graph. But I can 't solve a problem ㅜㅜ.
- y1 is not defined in the code - If you want to perform vector operation using function handle, use element wise operations f...

3 years ago | 1

| accepted

Answered
Question about searching a number in file suffix
d=5; s=sprintf('file_%d.txt',d) %command for reading the file fileread(s)

3 years ago | 0

| accepted

Answered
Get both values and indices
X = [4; 5; 1; 0; -7; 3; 0; 1; -4]; row = find(X>0 & X<6) val = X(row)

3 years ago | 0

| accepted

Answered
How can we insert a row matrix without altering the rest of the values?
A = reshape(1:15,3,5)' %pre-allocation y=zeros(size(A,1)*2,size(A,2)); y(1:2:end,:)=A; y(2:2:end,:)=A*10

3 years ago | 2

| accepted

Solved


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

3 years ago

Solved


Determine if input is a perfect number
A perfect number occurs whent the sum of all divisors of a positive integer, except the number itself, equals the number. Examp...

3 years ago

Solved


String substitution, sub problem to cryptoMath
This is a sub problem related to this problem: <http://www.mathworks.com/matlabcentral/cody/problems/621-cryptomath-addition>...

3 years ago

Solved


Calculate a modified Levenshtein distance between two strings
Inspired by the Cody problem found here. The Levenshtein distance is a charater-based string metric used to measure the differe...

3 years ago

Solved


Calculate the Levenshtein distance between two strings
This problem description is lifted from http://en.wikipedia.org/wiki/Levenshtein_distance. The Levenshtein distance between two...

3 years ago

Answered
apply if-else-statement to a 3D matrix
The syntax for comparing multiple conditions is individualistic in MATLAB, i.e. you have to write code for each condition indivi...

3 years ago | 1

| accepted

Answered
How i can concatenate the binary values of each two cell arrays into one binary value cell array?
as = {'1011','0001','0100','0110','1111','0111'}; str=strcat(as(1:2:end),as(2:2:end))

3 years ago | 0

| accepted

Answered
Format x and y axis
use xticks to specify the points (years in this case) you want

3 years ago | 1

Answered
Invalid Array Indexing when trying to plot the function
You forgot operation signs in a few places ((O^(1-n))./(4^n*a*x*pi^(1-n)*p))*(d_i^(2*n+1)+2*a(2*n+1)(4*O./pi)^(n)*t)^((2*n-1)....

3 years ago | 1

Solved


Sum the unitary divisors of a number
Cody Problems 1933 and 46898 deal with , the sum of divisors function. This problem deals with , the sum of unitary divisors fun...

3 years ago

Solved


Count the unitary divisors of a number
Cody Problem 56738 asks for a list of the unitary divisors of a number. For this problem, write a function to count the unitary ...

3 years ago

Solved


List unitary divisors of a number
A unitary divisor of a number divides and satisfies gcd(,) = 1. For example, 9 is a unitary divisor of 18 because gcd(9,2) = ...

3 years ago

Solved


Cross ("+") flag returns
Given two numbers, [m, n], return a matrix of size m x n which has all elements of the centre column and centre row set as 1, an...

3 years ago

Solved


Rescale Scores
Each column (except last) of matrix X contains students' scores in a course assignment or a test. The last column has a weighted...

3 years ago

Answered
specific RGB color in plot3
A=randi(100,10,3); %Marker size 5 is a bit small for a good visual plot3(A(:,1), A(:,2), A(:,3), 'LineStyle', 'none', 'Marker'...

3 years ago | 0

| accepted

Solved


return row and column indices given 2 values which define a range
Inspired by problem http://www.mathworks.co.kr/matlabcentral/cody/problems/856-getting-the-indices-from-a-matrice Inputs: - matr...

3 years ago

Solved


Acid-Base Chemistry: Which side of the reaction is more favorable?
In an Acid-Base reaction, there is always going to be an acid, a base, a conjugate acid, and a conjugate base. When provided wit...

3 years ago

Solved


GJam March 2016 IOW: Cody's Jams
This Challenge is derived from <http://code.google.com/codejam/contest/8274486/dashboard GJam March 2016 Annual I/O for Women Co...

3 years ago

Solved


Basics - not so easy division
Please make a function whcih divides x/y, but pay attention for some exceptions with NaN,0,Inf. Sometimes return "ERROR" instead...

3 years ago

Answered
Error during integration after differentiation
When you declare x as a symbolic variable, g will defined a symbolic variable as well. And as the error states, integral3 requir...

3 years ago | 0

Solved


Exact Cover
An efficient solution to the exact cover problem can be useful in many situations. In this problem, you are welcome to use Knuth...

3 years ago

Solved


Cricket - You Miss, I Hit (Rank Bowlers by Proportion of Bowled and LBW Wickets)
Which bowlers threaten your stumps the most? Given a table of all wickets taken during some particular set of matches and two th...

3 years ago

Solved


Cricket - Most Frequent Bowler-Batter Wicket Combinations
Given a table representing all wickets taken in a particular set of matches, return a table of the bowler-batter pairs that occu...

3 years ago

Solved


Compute the drag on a moving vehicle
We assume no rolling resistance, and the simple rule for Drag : , where is the density of the fluid (assumed at 1.2 ), is the ...

3 years ago

Load more