Réponse apportée
what is meant by index exceed matrics dimension?
If you have a 1 x 3 matrix A = [6 7 9] and try to access an element that does not exist, like A(2,3) or A(1, 4), you get ...

plus de 9 ans il y a | 0

Réponse apportée
Change element of a matrix in a row
help imfill

plus de 9 ans il y a | 0

Réponse apportée
Plotting points across the Sine Curve
plot(t, y) hold on ind = find(diff(y>0)<0); plot(t(ind), y(ind), 'ko') ind = find(diff(y>0)>0); plot(t(ind)...

plus de 9 ans il y a | 0

| A accepté

Réponse apportée
How would I check to see if the number of rows in one matrix are equal to the number of rows in another matrix?
You can use assert assert(size(A,1) == size(B, 1), 'Matrices have different numbers of rows.') If the condition given as...

plus de 9 ans il y a | 0

Réponse apportée
Detail lost showing images
900 x 1800 is pretty large. You can check the screen size using get(0,'ScreenSize') If your image fits on the screen...

plus de 9 ans il y a | 0

| A accepté

Réponse apportée
What font can I use to match my text to greek letters?
In which way are Matlab's default fonts for Greek and other characters not matching? You can change various properties, such...

plus de 9 ans il y a | 0

Réponse apportée
Ignore answers with imaginarey components
This is basically the implementation of Dr. Siva Srinivas Kolukula's answer: ind = ~isreal(C); A(ind) = []; B(ind) = [];...

plus de 9 ans il y a | 0

Réponse apportée
How to polarplot theta=3*pi/4 ?
theta = 3/4*pi; plot([0 cos(theta)], [0 sin(theta)]) axis equal axis([-1 1 -1 1])

plus de 9 ans il y a | 0

Réponse apportée
Apply a filter to an image
help imfilter

plus de 9 ans il y a | 0

Réponse apportée
converting matrix into image
I = im2double(imread('circuit.tif')); imshow(I)

plus de 9 ans il y a | 1

Réponse apportée
how to run a certain code loop for 'N' times and get 'N' number of output outside the loop.
You don't need the loop: A = rand(3, 5, N);

plus de 9 ans il y a | 1

Réponse apportée
How can I keep figures invisible when going between different figures and different subplots?
Don't use figure(2) but set(0, 'CurrentFigure', f(2)) where f(2) is the handle of figure 2, obtained with gcf wh...

plus de 9 ans il y a | 0

| A accepté

Réponse apportée
How to change gap between legend line and legend text?
You can increase the space by adding blanks ' ' in front of the legend entries. This is a hack, of course.

plus de 9 ans il y a | 0

| A accepté

Réponse apportée
How to draw nice dotted lines?
Check out <https://de.mathworks.com/matlabcentral/fileexchange/15743-fix-dashed-and-dotted-lines-in-eps-export>

plus de 9 ans il y a | 1

Réponse apportée
How can I plot an average line through this line graph
You store the values of each line in the rows of matrix X. Then use plot(mean(X))

plus de 9 ans il y a | 3

Réponse apportée
I need to take characters out of a string using isnan and str2double.
cellfun(@(x) sscanf(x, '%f'), regexp(a, '(\d+)', 'match'))

plus de 9 ans il y a | 0

| A accepté

Réponse apportée
How to extract coordinates from the pattern
white = 1; % or 255, depending on the format of your image [cy, cx] = ind2sub(size(I), find(I==1));

plus de 9 ans il y a | 0

Réponse apportée
Plotting bar graph using loop
A=xlsread(filename); for i = 1:3, h = histogram(A(:,i+1), [0 0.3 0.5 Inf]); hi(i,:) = h.Values; end bar(hi) legend({'0:0....

plus de 9 ans il y a | 0

Réponse apportée
three types of correlation coefficients for an image
I = im2double(imread('cameraman.tif')); c_diag = corrcoef(I(1:end-1, 1:end-1), I(2:end, 2:end)) c_vert = corrcoef(I(1:end-1...

plus de 9 ans il y a | 0

| A accepté

Réponse apportée
Why is my Plot Blank?
You don't need the for loop, you can work on the vector beta. You just have to replace * and / with .* and ./ (you already use ....

plus de 9 ans il y a | 0

Réponse apportée
Finding a chain in an adjacency matrix
You can use the power of the adjacency matrix as detailed in <http://math.stackexchange.com/questions/222429/graph-theory-sh...

plus de 9 ans il y a | 0

Réponse apportée
want to make a number of row matrix from a single row matrix
Your description is somewhat unclear to me. Do you mean cat(3, reshape(line1, [3 3])', reshape(line2, [3 3])')

plus de 9 ans il y a | 0

Réponse apportée
line profile adding certain rows together
ind = [-3 -2 2 3] + rMiddle; % rows +/- 3 pixels from rMiddle, but without row rMiddle and the direct rows +/- 1 pixels ab...

plus de 9 ans il y a | 0

| A accepté

Réponse apportée
How to select two matrices randomly from a set of N matrices and then randomly select a few rows from first selected matrix and then exchange with corresponding rows of other selected matrix.
Q = cat(3,A,B,C,D,E,F,G,H,I,J); kk = randperm(size(Q, 3), 2); % select 2 matrices from Q ii = randperm(size(Q, 1), 2); %...

plus de 9 ans il y a | 1

Réponse apportée
row-column confusion with squeeze
Squeeze squeezes out all singleton dimensions of X, *if X is not a matrix*. In case of C = squeeze(zeros(1,3,1)) who...

plus de 9 ans il y a | 1

Réponse apportée
How to find unique elements in a vector without using unique or find?
You can do this with for and if: suppose you have the numbers in x and want to generate the unique numbers in xu ...

plus de 9 ans il y a | 0

Réponse apportée
Merge a piecewise, parameterized Function
You can use logical indexing x = 1:100; y = [sin(x(x <= 20)) cos(x(x>20 & x <= 40)) tan(x(x>40))];

plus de 9 ans il y a | 0

| A accepté

Réponse apportée
Undefined function 'x0' for input arguments of type 'double'.??
You try to evaluate x0(4*n) and it seems that x0 is not defined. It could be a variable, if 4*n is an index, or a functi...

plus de 9 ans il y a | 0

| A accepté

Réponse apportée
Only the last user input is being stored, the rest are being replaced by zeros in my array.
Move the fprintf(fid1, '%6.3f,',n,y,x,z); inside the for loop.

plus de 9 ans il y a | 0

Charger plus