Réponse apportée
combining planes of data
M = cat(3, plane1, plane2, plane3,[more planes], plane512);

plus de 9 ans il y a | 1

Réponse apportée
Simple way to wrap quotes around input
str = ['''' str ''''];

plus de 9 ans il y a | 1

Réponse apportée
How to mirror matrix on the diagonal?
I2 = rot90(fliplr(I),-1);

plus de 9 ans il y a | 4

| A accepté

Réponse apportée
I have a problem with a plot
plot(x, y1); hold on plot(x, y2) or plot(x, y1, x, y2)

plus de 9 ans il y a | 1

Réponse apportée
Low computation efficiency of simple sentence in MATLAB
Instead of X = repmat(lambda_old1,1,4).*[W1(:,i),W3(:,i),W2(:,i),W4(:,i)]; if might be faster to use X = bsxfun(@time...

plus de 9 ans il y a | 1

| A accepté

Réponse apportée
How can I correct inhomogeneous intensity in image?
I = im2double(imread('blob.bmp')); y = mean(I(:, 1:100), 2); sigma = 30; % choosen by visual inspection G = f...

plus de 9 ans il y a | 0

| A accepté

Réponse apportée
How can I solve the " Index exceeds matrix dimensions" error for the following code ?
Don't use negative indices like -2, they are always invalid. Valid indices in Matlab start with 1 and end with the number of ele...

plus de 9 ans il y a | 0

Réponse apportée
reading a .txt
First check if the encoding is ISO-8859-1, such that accents are read correctly: if ~strcmp(feature('DefaultCharacterSet'), ...

plus de 9 ans il y a | 0

Réponse apportée
i have to save colour thresholded images in different folder according to their rgb values , but i can't work ..all the images are showing with the imshow() function but it can't stored on different folder as per their rgb values..pls help this out
Something is wrong with your condition, "out" is undefined. You can write if(red>88 & red<111 & green >86 & green <104 &...

plus de 9 ans il y a | 0

Réponse apportée
Randomize three chosen arrays in matlab
A = [0,0,1]; B=[0,1,0]; C=[1,0,0]; X = [A; B; C]; x = X(sub2ind(size(X), 1:3, randi(3, [1, 3])))

plus de 9 ans il y a | 0

Réponse apportée
concatenate all value in a matrix into one number
This works even if the numbers are not single digits, i.e., in in {1,2,...,9} v = [10 20 4]; num = sscanf(sprintf('%d', v...

plus de 9 ans il y a | 0

| A accepté

Réponse apportée
Connecting line between different points obtained from a for-loop
x = 1:20; y = x+2; plot(x,y,'*-')

plus de 9 ans il y a | 0

Réponse apportée
Matlab delete's value's from array
You remove all rows that contain a NaN in the line k(any(isnan(k),2),:)=[]; and then you assign the variables varia...

plus de 9 ans il y a | 0

Réponse apportée
how can i find the displacement in pixels for the 1st, 3rd and 5th squares in the picture
% number here found by visual inspection I = im2double(imread('1.JPG')); index_center = size(I,2)/2+100:size(I,2...

plus de 9 ans il y a | 1

| A accepté

Réponse apportée
Change the default filling of a matrix
I do not know anyway to change the default behaviour of Matlab to fill the empty positions with zeros. So you have to do it in t...

plus de 9 ans il y a | 0

Réponse apportée
Trying to make a "snake" matrix?
N = 5; M = 9; T = reshape(1:M*N, [M, N])'; T(2:2:end,:) = fliplr(T(2:2:end,:));

plus de 9 ans il y a | 0

| A accepté

Réponse apportée
Elimination of rows in array
A(A(:,1)+A(:,2) < A(:,3) | A(:,1)+A(:,2) > A(:,4), :) = [];

plus de 9 ans il y a | 0

| A accepté

Réponse apportée
setting the position of the legend
The height of the box is the fourth parameter of the position. To reduce the size you can do the following: p = leg.Positio...

plus de 9 ans il y a | 0

Réponse apportée
How to make this complicated array
x = 5; y = 8; a(x,y) = 0; a([1:x 2*x:x:y*x y*x-1:-1:x*(y-1)+1 x*(y-2)+1:-x:x+1]) = 1:2*x+2*(y-2);

plus de 9 ans il y a | 0

Réponse apportée
Comparing a number matrix to certain values and storing it in another array / matrix
R = 5*rand(4); A = zeros(size(R)); A(R>=1 & R <= 2) = 1; B = zeros(size(R)); B(R>=3 & R <= 4) = 2;

plus de 9 ans il y a | 0

Réponse apportée
How to replace name with number
[~, ~, xnum] = unique(x, 'stable')

plus de 9 ans il y a | 0

Réponse apportée
How to change the language of 2015b (32bit) from english to chinese?
<http://de.mathworks.com/help/matlab/internationalization.html>

plus de 9 ans il y a | 0

Réponse apportée
Creating file names for save command
file_dir = 'C:\Users\mydir'; datestamp=char(datetime('now','TimeZone','local','Format','yyyyMMdd_HHmmss')); file_name...

plus de 9 ans il y a | 0

Réponse apportée
How to assign two values randomly among 2 variables?
idx = rand(100,1); sensor1 = c1; sensor1(idx>0.5) = c2; sensor2 = c1; sensor2(idx<=0.5) = c2;

plus de 9 ans il y a | 0

Réponse apportée
Find a pair of elements in a 3d matrix
Logical index: idx = A(:,:,1) == 0 & A(:,:,2) == 0; if you prefer a single index, you can use idx2 = find(idx); if...

plus de 9 ans il y a | 0

| A accepté

Réponse apportée
optimization to get the least ratio of variables for two functions
You get the index of the minimum ratio A/B using [~, idx] = min(A./B);

plus de 9 ans il y a | 0

Réponse apportée
How to calculate compound interest?
If you have amount A at an interest rate of r, you have after one month A + rA = A(1 + r) after two months A(1+r) + ...

plus de 9 ans il y a | 0

Réponse apportée
How can I create shortcuts to layouts
You can set Shortcuts under Matlab > Preferences > Keyboard > Shortcut, but only for some pre-defined actions; changing the layo...

plus de 9 ans il y a | 0

Réponse apportée
Save multiple images in a folder
You have to use a new name for each image; e.g., for your i'th image: filename = sprintf('myimage%02d.png', i);

plus de 9 ans il y a | 0

Charger plus