Solved


Find max
Find the maximum value of a given vector or matrix.

12 years ago

Solved


Who is the smartest MATLAB programmer?
Who is the smartest MATLAB programmer? Examples: Input x = 'Is it Obama?' Output = 'Me!' Input x = 'Who ?' Ou...

12 years ago

Solved


Generate a NaN...on purpose
The goal is to create a function that will return a single "NaN" without using the nan function. I am interested to see how many...

12 years ago

Solved


Guess Cipher
Guess the formula to transform strings as follows: 'Hello World!' --> 'Ifmmp Xpsme!' 'Can I help you?' --> 'Dbo J ifmq zpv...

12 years ago

Solved


Replace multiples of 5 with NaN
It is required to replace all values in a vector that are multiples of 5 with NaN. Example: input: x = [1 2 5 12 10 7] ...

12 years ago

Solved


Number of Horns on a unicorn!
Calculate the number of horns on a *unicorn*! And I'm talking about a unicorn with not more than one horn on it!

12 years ago

Solved


Stuff the Board
You have a stack of tiles to put onto an array-like playing board. Each tile has a number (always an integer), and the board var...

12 years ago

Answered
How to determine the position of an integer
If the values are in the cell format use *cell2mat* function: pos = find(cell2mat(d)==3)

12 years ago | 0

Answered
unique values in array
Simply idea is to use loop: f = [1 , timing(1)]; for k=2:numel(timing) if timing(k)~=timing(k-1) ...

12 years ago | 0

| accepted

Answered
I am doing a project using structured light, I need image to be showed in 'full screen mode', how?
Have you tried this function: <http://www.mathworks.com/matlabcentral/fileexchange/23404-fullscreen-1-1> ?

12 years ago | 0

| accepted

Answered
How can I change the x-axis to log scale using boxplot?
First question: Can you write small example? Because I don't understand fully your problem. Second question: Instead of...

12 years ago | 0

Solved


How many trades represent all the profit?
Given a list of results from trades made: [1 3 -4 2 -1 2 3] We can add them up to see this series of trades made a profit ...

13 years ago

Solved


How long is the longest prime diagonal?
Stanislaw Ulam once observed that if the counting numbers are <http://en.wikipedia.org/wiki/Ulam_spiral arranged in a spiral>, t...

13 years ago

Solved


Generate a vector like 1,2,2,3,3,3,4,4,4,4
Generate a vector like 1,2,2,3,3,3,4,4,4,4 So if n = 3, then return [1 2 2 3 3 3] And if n = 5, then return [1 2 2...

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

13 years ago

Solved


sum of non-primes
The sum of the non-primes below 10 is 1+4+6+8+9+10=38 Find the sum of all the non-primes below the input, N.

13 years ago

Solved


Given a window, how many subsets of a vector sum positive
Given a vector: [1 0 -1 3 2 -3 1] and a window of 2, A sliding window would find: 1 + 0 = 1 0 - 1 = -1 ...

13 years ago

Solved


Add two numbers
Calculate the sum of two numbers. Example input = [2 3] output = 5

13 years ago

Answered
Is there an implementation of Tarjan's algorithm for triconnected components of a graph in MATLAB?
<http://www.mathworks.com/help/toolbox/bioinfo/ref/graphconncomp.html GRAPHCONNCOMP> - Find strongly or weakly connected compone...

13 years ago | 0

Answered
How to open a .m file by a double-click, on Ubuntu 12.04
This might help: http://www.walkingrandomly.com/?p=300

13 years ago | 0

Answered
Adjusting the colorbar to zero value
I'm not sure if I good understand your problem, but maybe *caxis* function will be helpful: contourf(peaks+10) cmap = je...

13 years ago | 0

Answered
How can I update data for quiver plot?
I think that this is impossible for quiver plot. Try this code: [X,Y] = meshgrid(-2:.2:2); Z = X.*exp(-X.^2 - Y.^2); ...

13 years ago | 2

| accepted

Answered
I have generated a large dataset. Now I need to draw random samples from it. How can I do this?
For example: data = exp(-(-10:0.1:10).^2); idx = randperm(numel(data)); N = 20; idx = idx(1:N); plot(id...

13 years ago | 0

Answered
plotting several quadratic functions
Yes, I think that it is good idea: figure hold all x = linspace(0,1); for a=-1:1:2 plot(x,a*x.^2+1) ...

13 years ago | 0

| accepted

Answered
How to display 3D image in each layer?
Just clear unnecessary channels: I = imread('http://www.3drealms.com/zerohour/images/zhbackground.bmp'); figure r = I...

13 years ago | 1

| accepted

Answered
How can i reset axes and edittext?
So add a button and in its callback fucntion write code which clear axis and edittext field. i.e. cla(handles.axis1) ...

13 years ago | 1

| accepted

Answered
editing inside cells array
You can try this code: for i=1:size(POT1,1) for j=2:size(POT1,2) if ~isempty(POT1{i,j}) PO...

13 years ago | 1

| accepted

Answered
i want to find out area under the curve using quad command ,the curve is generated after running the programme
If you draw yourself Bode plot (see code), you receive vectors 'x' and 'y', which can be numerically integrate. [HMag, HPha...

13 years ago | 0

Answered
plot 2d color graph
In my opinion you should use the imagesc function. x = 1:10;% 10 stimulus y = 1:8;% 8 subparts z = randi(5,8,10)-1;% ...

13 years ago | 0

Solved


Connect Four Win Checker
<http://en.wikipedia.org/wiki/Connect_Four Connect Four> is a game where you try to get four pieces in a row. For this problem, ...

13 years ago

Load more