Respondida
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; % ...

casi 11 años hace | 1

| aceptada

Respondida
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)

casi 11 años hace | 0

| aceptada

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

casi 11 años hace | 0

| aceptada

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

casi 11 años hace | 0

| aceptada

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

casi 11 años hace | 1

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

casi 11 años hace | 0

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

casi 11 años hace | 0

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

casi 11 años hace | 0

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

casi 11 años hace | 0

| aceptada

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

casi 11 años hace | 0

Respondida
can't find mexopts.bat
Try mex -setup

casi 11 años hace | 2

| aceptada

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

casi 11 años hace | 0

Respondida
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

casi 11 años hace | 0

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

casi 11 años hace | 1

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

casi 11 años hace | 0

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

casi 11 años hace | 0

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

casi 11 años hace | 0

| aceptada

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

casi 11 años hace | 0

Respondida
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;

casi 11 años hace | 0

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

casi 11 años hace | 1

| aceptada

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

casi 11 años hace | 0

| aceptada

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

casi 11 años hace | 0

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

casi 11 años hace | 1

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

casi 11 años hace | 0

| aceptada

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

casi 11 años hace | 0

Respondida
interp1 and spline error
K = [ 0 34.4707 0.1000 29.2219 0.2000 33.9285 0.3000 30.2549 0.4000 27.5845 ...

casi 11 años hace | 0

| aceptada

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

casi 11 años hace | 0

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

casi 11 años hace | 4

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

casi 11 años hace | 0

Respondida
How i can calculate row wise avg of an image??
output = mean(temp1, 2);

casi 11 años hace | 2

| aceptada

Cargar más