Answered
grouping data in column vector based on another vector
Assuming that sum(A) == numel(C), You can use for loops and cell arrays to get the result X=C; %Assigning C to another variable...

5 years ago | 2

Solved


Calculate the average value of the elements in the array
Calculate the average value of the elements in the array

5 years ago

Answered
All possible combination based on 2^n but with 1 and -1
y=dec2bin([7 4 2 1])-'0'; y(y==0)=-1; z =[y; flipud(y)] This only works for this particular example. If you want a generalise...

5 years ago | 1

Answered
All possible combination based on 2^n
y = flipud(dec2bin(0:2^n-1,n))-'0' %method 1 y = dec2bin(2^n-1:-1:0,n)-'0' %method 2 Choose any of the methods you wi...

5 years ago | 2

Answered
Split vector into array with different ranges
a=[22 9 65 814 165 3]; x=a(a<10); y=a(a>=10&a<100); z=a(a>=100); This is assuming that the numbers in x are in the range [0-...

5 years ago | 0

Solved


Flip coins

5 years ago

Answered
Extend a string within a for loop by values from switch case
No, MATLAB doesn't support Augmented addition, (using +=) However, you can obtain the same result with a variable, x=x+1; and u...

5 years ago | 2

| accepted

Solved


Cell Operator *
Please implement operator * for cell: >> {2,3} * 2 ans = 1×4 cell array [2] [3] [2] [3] >> {2,3} * [2 3]...

5 years ago

Solved


Prime Letters = Removing
Given a string, remove all the letters which in ASCII Code are prime numbers. For Example: s1 = 'Determine which array e...

5 years ago

Solved


Get the combinations
Consider p,q = 2 vectors of same or different length. Get a Output Array which has all the possible combinations of Elements o...

5 years ago

Solved


Concatenated roots
Which is the value of this infinte concatenated roots? <<https://s27.postimg.org/i4hkin7xf/Code_Cogs_Eqn.gif>> Note: If ...

5 years ago

Solved


Polynomial Evaluation
Create a routine that takes a list of coefficients of a polynomial in order of increasing powers of x; together with a value of ...

5 years ago

Answered
Replace nested loops with a matrix
Unew = zeros(nhx, nhy); Unew(2:nhx-1, 2:nhy-1)=U(2:nhx-1, 2:nhy-1)-dt.*(P(3:nhx,2:nhy-1)-P(1:nhx-2,2:nhy-1))./(2*hx); Source

5 years ago | 1

Solved


Toeplitz Matrix
For a given square matrix of order n-by-n check whether this is a Toeplitz matrix or not. Return true if it is.

5 years ago

Solved


Normalizing a vector

5 years ago

Answered
i try to print from (row, column) but I'm keep getting (row,row) for some reason.
You are getting this result because you have defined tables using horinzontal concatenation. table = [Names,Attempts]; Chang...

5 years ago | 0

Solved


Given n, create n random numbers such that their standard deviation is also n.
Given n, create n random numbers such that their standard deviation is also n.

5 years ago

Solved


Prime factor digits
Consider the following number system. Calculate the prime factorization for each number n, then represent the prime factors in a...

5 years ago

Solved


Twin Primes
Twin primes are pairs of primes that are immediately next to each other (difference of two). The lesser of twin primes are 3, 5,...

5 years ago

Solved


Closely related?
Given a function past_records() that will report blood sugar level of two twin brothers some random number of days ago. For exam...

5 years ago

Solved


Smith numbers
Return true if the input is a Smith number in base ten. Otherwise, return false. Read about Smith numbers at <http://en.wikipedi...

5 years ago

Solved


Keep Only the Upper characters in a string
Keep Only the Upper characters in a string s = 'Sreeram Mohan'; output = SM;

5 years ago

Answered
cite the Matlab documentation
Citing MATLAB

5 years ago | 1

| accepted

Solved


sort matrix
Given a matrix, sort it for each column, but cannot change the element of each row. for example input = [1 3; 2 4;1 5;3 6]; ...

5 years ago

Solved


Numbers in extended form
Shhhhhhh. Don't tell my daddy, but I'm borrowing his Cody account so all of you very smart people can help me out. I just star...

5 years ago

Solved


Reverse Calculator
Use this reverse calculator and give correct output Its simple, In my Reverse calculator if you press 0 it will be considered...

5 years ago

Solved


Ripping numbers apart!
So you have to "rip" a number apart into individual digits... The end output is a cell. That is if: x = 12345678 o...

5 years ago

Solved


Decode a simplified barcode
Given a bar code from this <http://www.mathworks.com/matlabcentral/cody/problems/602-make-a-simplified-bar-code exercise>: Re...

5 years ago

Solved


Implement simple rotation cypher
If given a letter from the set: [abc...xyz] and a shift, implement a shift cypher. Example: 'abc' with a shi...

5 years ago

Solved


Surface Fit z(x,y)
Given three vectors x,y,z. Find four coefficients c = [cxx cxy cyy c00], such that z = cxx*x.^2+cxy*x.*y+cyy*y.^2+c00. For e...

5 years ago

Load more