Answered
Regarding Mutual information calculation of two binary strings
When computing mutual information you may assume that 0*log(0) == 0. In your code you could remove all the "if XXX==0" checks,...

12 years ago | 1

| accepted

Answered
corrcoef : p value interpretation
There are several issues here: *1) regarding why you are getting not significant values in your example:* N = 1000; X =...

12 years ago | 4

| accepted

Answered
How to read files' names efficiently
Something like: files = dir; % Your list of files [~,filenames] = cellfun(@fileparts,{files.name},'uni',0); % Your list ...

12 years ago | 0

Answered
Updating handles from within Position Changed Callback
Your figure might have a resizefcn callback that could be reverting those values. Check: get(gcf,'resizefcn');

12 years ago | 2

| accepted

Answered
Help with the interpolate function
Use interp1 instead of interp

12 years ago | 1

| accepted

Answered
Quadratic time detrending. Any help or code ???
Yes, that should work, you just need to define: Ynew = Y - Th; to get the new "detrended" timeseries.

12 years ago | 0

| accepted

Solved


Latest Question On Cody
Get the problem number of the latest submitted Problem on Cody. Copying the test suite code might not help.

12 years ago

Answered
Turn my (easy) for loop into a recursive function?
You almost got it. Your are just: 1) overwriting the variable N, which you probably did not intend; and 2) including an unnecess...

12 years ago | 0

| accepted

Answered
How to find the row and column of elements where the value of A is the same as B
[i,j] = find(A==B);

12 years ago | 0

| accepted

Answered
How to assign user entered values(integers entered in an edit text box) to an already user entered string in a listbox of MATLAB GUI? . Your support would be very useful.
Let's say that _h_list_, and _h_text_, are the handles to your listbox and textbox, respectively (which you have already creat...

12 years ago | 0

Answered
If a=[1 2 3], b=[10 20 30], how to create c=[10 20 20 30 30 30]?
c = cell2mat(arrayfun(@repmat,b,ones(size(a)),a,'uni',0));

12 years ago | 1

| accepted

Solved


Let's see how peculiar we can get
The task is to multiply two numbers. But do it in the most peculiar possible way.

12 years ago

Solved


Mechanical Advantage of a Gear Train
Calculate the mechanical advantage of a gear train. The mechanical advantage of a gear couple is given by MA = T_o/T_i where ...

12 years ago

Solved


Temperature Conversion Utility
There are a few problems on Cody regarding temperature conversion (C to K, C to F, F to C), but none include Rankine. Furthermor...

12 years ago

Solved


Is My Wife Wrong?
Answer the question. (see also <http://www.mathworks.com/matlabcentral/cody/problems/149-is-my-wife-right Problem 149: Is my ...

12 years ago

Solved


Largest Prime Number
Given a matrix X, find the largest prime number in X.

12 years ago

Solved


Determine the length of a string of characters
Determine the length of a string of characters

12 years ago

Solved


Integer to boolean
Write a general function that will create the following conversation; Input is a column vector with integers Output is a b...

12 years ago

Solved


Find the biggest digit in a matrix
Write a function to find the biggest digit in a matrix; input -> a matrix output -> a digit For example; [12; 47;...

12 years ago

Solved


possible ways through matrix
This problem is inspired from problem 2405 <https://www.mathworks.com/matlabcentral/cody/problems/2405-the-number-of-ways>. C...

12 years ago

Solved


The Number of Ways
Find all the possible ways to reach the end of a matrix. So given [a b c d] the possible ways [a c],[a d],[b c],[b ...

12 years ago

Answered
how can i make a music using matlab??
Or you could go all modern and synthesize your own: fs=16384; % sampling frequency T=10; % 10-second son...

12 years ago | 1

Solved


Reshape a Vector
Write a function that accept three inputs. The first one is a row vector S. The second and third arguments are m and n which de...

12 years ago

Answered
Appending to the field of a structure array
Assuming that you want _Index_ to be a single struct with fields _Words/Documents/Locations_ (each of the fields being a cell ar...

12 years ago | 1

Answered
Find first element in each row greater than a given element from another matrix.
Something like this would also work: cond = bsxfun(@gt,A,B); [ok,idx] = max(cond,[],2); C = ok.*A((1:numel(idx))'+numel(...

12 years ago | 4

Solved


Best Square-Shaped Grid for Subplot
If you have x number of plots, find the optimum 'm' number of rows and 'n' number of columns for subplotting where the overall f...

12 years ago

Solved


Area of a Square
Inside a square is a circle with radius r. What is the area of the square?

12 years ago

Solved


Measure a Special Distance
Given an n-by-2 matrix with positive and negative numbers, return an n-by-n matrix in the manner of the function template.

12 years ago

Solved


FIFA World Cup 2014 : Offside
This problem is about offside rule in football (soccer). Input is a matrix with mostly zeros and a few 1, 2, 3 and 4s. A zer...

12 years ago

Solved


Leap Year
According to Gregorian Calender(which is in use now, in many countries),decide whether a given year is a leap year or not. Give...

12 years ago

Load more