Réponse apportée
Extract data from countour and add two (or more) contours together.
The idea is to compute a new QxxPRIME for the different offsets and add them to QxxPRIME0 for zero offset: u = 80000; % ...

plus de 10 ans il y a | 1

| A accepté

Réponse apportée
How to return only one of multiple identical max/min values?
x = [10 20 30 40 50 50]; x(find(x == max(x), 1, 'first')) or simply max(x)

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
How to create a wire of white dots
N = 2500; line_element = [1 1 0 0 0]; I1 = repmat(line_element, N, N/numel(line_element)); line_element = [ones(1...

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
creating Arrys from another big array
index=[1 25 40 63 77 99 100] A = rand(1,100); for i = 1:numel(index)-1 B{i} = A(index(i):index(i+1)); end Note t...

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
Is it possible to put subplots next to each other without any gap?
Use http://www.mathworks.com/matlabcentral/fileexchange/39664-subtightplot

plus de 10 ans il y a | 1

Réponse apportée
Performing equations on individual elements of a 3D Matrix, and then summing that along the z column
You can write the whole computations w/o a for loop in a one-liner. For example, if the equation is A+2 if A == 0 and A.^2 if A ...

plus de 10 ans il y a | 0

Réponse apportée
Legend on MATLAB FIGURES
h = legend(... % your code here set(h, 'FontSize', 8); % reduce font size used in legend

plus de 10 ans il y a | 0

Réponse apportée
Is there a way to do a by row comparison of two data sets with the same number of columns, different number of rows, and different parameters for each column?
A = [1.0001 2.0002; 8.1234 5.0]; B = [1.0002 3.0; 8.1235 3.0 8.1233 6.0]; tol = [0.001 1]...

plus de 10 ans il y a | 0

Réponse apportée
Take a lineout of a matrix, defined by a function
i = 1:size(M,1); f = @(i) i; M(sub2ind(size(M), i, f(i))) f = @(i) 4 - i; M(sub2ind(size(M), i, f(i))) f = @(i)...

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
Vector and matrix index operations
Use eval: myvect={'101AA21' '101AA22' '101AA23' '102AA21' '102AA22'}; mymatrix=magic(5); for i = 1:numel(myvect) ...

plus de 10 ans il y a | 0

Réponse apportée
can't find mexopts.bat
Try mex -setup

plus de 10 ans il y a | 2

| A accepté

Réponse apportée
Faster method of creating list of looped row vectors?
kres=0.01; kx = -3:kres:3; N = numel(kx); k1 = repmat(kx, [N 1]); K2 = [k1(:) repmat(kx', [N 1]) repmat(0, [N^...

plus de 10 ans il y a | 0

Réponse apportée
How to copy content of of 7*14 matrix file(*.mat) to a table on Microsoft Word??
Try http://www.mathworks.com/matlabcentral/fileexchange/4643-table2word

plus de 10 ans il y a | 0

Réponse apportée
How can I reverse the direction of the rows and columns using printmat?
Use my function printmapud: function printmapud(a,name,rlab,clab) T = evalc('printmat(flipud(a),name,fliplr(rlab),cl...

plus de 10 ans il y a | 1

Réponse apportée
eval(['A = ',imtype,'(abs(V*D*V^(-1)));']) ??? Error using ==> mtimes Logical inputs must be scalar.
To trace down the error, please try whos V whos D A = abs(V*D*V​^(-1)); switch imtype case 'double', A = dou...

plus de 10 ans il y a | 0

Réponse apportée
How to implement following in matlab?
You can do this using nchoosek and ismember: A = [1 2;2 2;5 2;6 2;3 1;4 1]; col2val{1} = 2; col2val{2} = [1 2]; col2v...

plus de 10 ans il y a | 0

Réponse apportée
How to delete an object without a dot on it?
You can use bwlabel to label the binary image, L = bwlabel(I); then get the label of the phone using the coordinates of ...

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
hi-i have a one dimensional for loop and i need to change it to different dimensional?
If GT_New is defined to process 1X33 input, you replace the four line with R_KNM=KNM(NM,:); If you do not need R_KNM else...

plus de 10 ans il y a | 0

Réponse apportée
Remove unwanted lines from an image
I = im2double(imread('Untitled.png')); I = im2bw(I(:,:,1), 0.5); L = bwlabel(I); I(L== L(167, 10)) = 0;

plus de 10 ans il y a | 0

Réponse apportée
How to find similar elements with small difference (+/- 5%)?
One way would be to do this in a straight-forward loop: p = 0.05; % percentage of difference accepted C = nan(1, numel(...

plus de 10 ans il y a | 1

| A accepté

Réponse apportée
How to find out radii of spheres when mean and standard deviation of radius distribution is know and sum of volumes of all spheres is constant?
First let's clarify some points: 1. If it is the volume, the unit should be unit^3; otherwise it would be the area of a circle;...

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
How do I plot the intensity profiles of a sequence of images?
As far as I understood is the problem not the algorithm but that the loop seems to run only once. First I would simply add a ...

plus de 10 ans il y a | 0

Réponse apportée
Does Matlab resize vectors automatically
That works because the : is matched here to a row or a column vector and converted to a row vector. So you can assign either a r...

plus de 10 ans il y a | 1

Réponse apportée
A simple code gives me an error, anyone help in this issue?
p is not known to your function. You have to define the function with all arguments you need inside: function y = van(v, a, ...

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
Why won't this for loop move to the next variable?
I you code only i cycles to the values 49,50, ..., while j and k are always a 4x1 vector [1; 18; 43; 63] and k = [1112; 1129; 1...

plus de 10 ans il y a | 0

Réponse apportée
interp1 and spline error
K = [ 0 34.4707 0.1000 29.2219 0.2000 33.9285 0.3000 30.2549 0.4000 27.5845 ...

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
How can I get X and Y column Matrices from plotted data?
[i j] = ind2sub(size(I), find(I == 0));

plus de 10 ans il y a | 0

Réponse apportée
How do I use Goto in MATLAB
From http://stackoverflow.com/questions/1082605/jump-command-in-matlab There is no goto statement in MATLAB, but there are a ...

plus de 10 ans il y a | 4

Réponse apportée
how to change the color of each point in the surface?
plot3(3,4,5,'b', 5,4,3,'r') If you have dozens of points use scatter3(x(:),y(:),z(:), [], col) where col is a Nx3 col...

plus de 10 ans il y a | 0

Réponse apportée
How i can calculate row wise avg of an image??
output = mean(temp1, 2);

plus de 10 ans il y a | 2

| A accepté

Charger plus