A résolu


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

environ 13 ans il y a

A résolu


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

environ 13 ans il y a

A résolu


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

environ 13 ans il y a

A résolu


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

environ 13 ans il y a

A résolu


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

environ 13 ans il y a

A résolu


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!

environ 13 ans il y a

A résolu


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

environ 13 ans il y a

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

environ 13 ans il y a | 0

Réponse apportée
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) ...

environ 13 ans il y a | 0

| A accepté

Réponse apportée
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> ?

environ 13 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 13 ans il y a | 0

A résolu


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

plus de 13 ans il y a

A résolu


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

plus de 13 ans il y a

A résolu


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

plus de 13 ans il y a

A résolu


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

plus de 13 ans il y a

A résolu


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.

plus de 13 ans il y a

A résolu


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

plus de 13 ans il y a

A résolu


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

plus de 13 ans il y a

Réponse apportée
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...

plus de 13 ans il y a | 0

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

plus de 13 ans il y a | 0

Réponse apportée
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...

plus de 13 ans il y a | 0

Réponse apportée
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); ...

plus de 13 ans il y a | 2

| A accepté

Réponse apportée
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...

plus de 13 ans il y a | 0

Réponse apportée
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) ...

plus de 13 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 13 ans il y a | 1

| A accepté

Réponse apportée
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) ...

plus de 13 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 13 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 13 ans il y a | 0

Réponse apportée
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;% ...

plus de 13 ans il y a | 0

A résolu


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

presque 14 ans il y a

Charger plus