Solved


Return the Nth Output from an Input Command
*Description* Given _F_, a cell array whose first element is a function handle and subsequent elements are arguments, return ...

3 years ago

Solved


Best Fit RMS
Given a set of data as x and y, find the <http://en.wikipedia.org/wiki/Root_mean_square RMS> value between the data and its best...

3 years ago

Solved


GJam 2014 China Rd A: Read Phone Number (Large)
This Challenge is derived from <http://code.google.com/codejam/contest/2924486/dashboard GJam 2014 China Read Phone Number>. Lar...

3 years ago

Solved


GJam 2014 China Rd A: Read Phone Number
This Challenge is derived from <http://code.google.com/codejam/contest/2924486/dashboard GJam 2014 China Read Phone Number>. Sma...

3 years ago

Answered
How to delete Multiple of any Value in Array In MATLAB
y=load('multiple.mat').Value; %all the different value present in the array z=unique(y) for j=unique(y) y( (rem(y,j)==0)...

3 years ago | 0

| accepted

Solved


function on a moving window
Create a function that applies an operation (such as @sum, @mean, @std, @norm etc) to a moving window of the data. First exampl...

3 years ago

Solved


Return the sequence element III
This problem is related to <http://www.mathworks.com/matlabcentral/cody/problems/42832-segmented-number-sequence Problem 42832>....

3 years ago

Solved


Moving average
A moving average function that returns an array that is equal in length to the input arrays (which can be row or column) A va...

3 years ago

Solved


Segmented number sequence
Given a positive integer, n, and a row vector, x, of positive integers, return a row vector, v, which is a sequence of length n ...

3 years ago

Solved


Whole Number Un-Concatenator
Write a function that accepts an integer and an index digit and returns a vector containing two integers which are the leading a...

3 years ago

Solved


Integer sequence - 2 : Kolakoski sequence
Get the n-th term of Kolakoski Sequence.

3 years ago

Solved


deconvolution
* Suppose there is a vector v like [1 0 0 -1], representing polynomial coefficients. * In this example, the polynimial is 1*x^3...

3 years ago

Solved


Compute the dilation of a binary image
A basic operation in image analysis is the dilation. Given an image where each pixel is either on or off (black/white, true/fals...

3 years ago

Solved


Index of neighbor pixel with steepest gradient
Unlike in various applications, where the gradient of a two dimensional matrix is calculated in x and y direction, the gradient ...

3 years ago

Answered
Find value in Fibonacci sequence
You don't need to explicitly define condition for n == 1 and n == 2, they can be covered by how you define the sequence. Now, d...

3 years ago | 2

| accepted

Answered
Show real positive solution on a fourth grade equation
Wo = 3584.74 * 9.8; %N rho = 1.225; %kg/m^3 D_r = 11.5; %m R_r = D_r/2; %m S_r = pi * R_r^2; %m^2 sigma_r = 0.073309651; o...

3 years ago | 0

| accepted

Solved


how to determine is a point is inside, on or outside a polygon?
design function determines whether the point is inside a contour, outside, or lies on an edge (or coincides with a vertex). It r...

3 years ago

Solved


compare strings
Given 2 strings and 3 actions (Insert,delete,replace) on characters. Find the difference between two strings. Example: str...

3 years ago

Answered
Find the greater number in a matrix
This is a simple case of logical indexing. A=[01 ; 10 ; 11 ; 00]; B=[0.234 ; 0.148 ; 0.226 ; 0.118]; Z=B>=0.22; C=B(Z) D=...

3 years ago | 0

| accepted

Answered
How to convert decimal to binary without adding leading zeros?
You will not be able to do that in a char array, due to inconsistent dimensions. You can, however, obtain the desired result in...

3 years ago | 2

Solved


Intersection points of a polynomial
Find the intersection points of a polynomial, given by its vector of coefficients with the X-axis and the Y-axis. Input: a poly...

3 years ago

Answered
Can we distinguish between variables and parameters in a symbolic function?
syms f(x) a m n z f(x)=a*x y=symvar(f) I understand what you mean by 'cannot distinguish between x and a' But, this is how s...

3 years ago | 0

| accepted

Answered
How do I create this graph with a blue bottom filling in MATLAB?
x=0:0.01:15; y=sin(x)+pi*x/5; area(x,y,'FaceColor', 'c', 'EdgeColor', 'b')

3 years ago | 2

| accepted

Answered
Solving four trigonometric equations, four unknowns
You can solve symbolically - syms r1 t2 t3 t4 e1 = 10*cos(t3) + 10*cos(t2) - r1 == 0; e2 = 15*cos(t4) + 12*cos(t2) - r1 == 0...

3 years ago | 1

Answered
How to plot Data based fifth column
y=load('Data.mat').pdw; y0=y(:,5)==0; y1=y(:,5)==1; plot(y(y0,1),y(y0,2)) hold on plot(y(y1,1),y(y1,2)) legend({'Correspon...

3 years ago | 0

| accepted

Solved


Wavy gravity
In a parallel universe the gravity works very strangely. Indeed, gravity is equal to: g = sin( (pi/2)*t/60 ) [m/s^2], where t i...

3 years ago

Solved


Calculate the derivative of a polynomial
Example: in = [ 1 1 1 ] out = [ 2 1 ]

3 years ago

Answered
Get back variables out of function inside a for loop
J = [2.5 27 56]; WZ = [12.2 23.2 33]; M1 = 22; I1 = 2600; slope=(J-M1)./(WZ+3750-I1) [minval,minid]=min(slope) Jval=J(mi...

3 years ago | 1

Answered
How to check if an integer is above or below 0.5 continuously ?
If you have numeric data, you can do something like this - x=0:0.01:3; y=abs(sin(pi*x)); %original plot plot(x,y,'k-') hol...

3 years ago | 1

| accepted

Solved


Dyck words
A Dyck word can be considered as a string of n X's and n Y's arranged to have at least as many X's in an initial segment of the ...

3 years ago

Load more