Answered
how can obtain min of matrix
Another approach: tmp = A; % avoid destroying A tmp(tmp == 0) = Inf; % make zero elements bigger...

mer än 9 år ago | 0

Answered
How to plot a line with angle of 'Orientation' and length of 'MajorAxisLength' through 'Centroid'?
Your original code is almost right. You just need to think through the geometry a little more. This works: st = regionprops...

mer än 9 år ago | 4

| accepted

Answered
variable in if statement is undefined on some execution paths
You can change elseif Tf/L>0.04 to else since if the first test fails the second must succeed. That should remo...

mer än 9 år ago | 0

| accepted

Answered
For loop and omitting every 10th step
for i = floor(1:10/9:30) ... end

mer än 9 år ago | 1

Answered
why the name of software is MATLAB?
Try the Wikipedia article - the first sentence addresses this.

mer än 9 år ago | 1

Answered
Adversity Testing MATLAB. Why does matlab say this?
<http://www.mathworks.com/help/symbolic/mupad_ref/c_.html C_> is the set of complex numbers. That looks right, since the identit...

mer än 9 år ago | 0

| accepted

Answered
Guessing the value of the temperature depending of the closest neighbours(3D)
If linear interpolation is sufficient, you can try interpolant = scatteredInterpolant(m(:,1:3), m(:,4)); temp = interpol...

mer än 9 år ago | 0

Answered
Why does my plot not display?
The problem is that both *day_counter* and *savings* are scalars, so there is nothing to plot. I suspect that what you need is t...

mer än 9 år ago | 0

Answered
Plot style '--' in 2014b
I think you should contact MathWorks about this. I've also experienced significant problems with plot() in R2014b (in my case wi...

mer än 9 år ago | 1

Answered
ifft2 on an asymmetric matrix does not work correctly?
ifft2 works correctly. You can demonstrate this with the following code img = rgb2gray(imread('peppers.png')); % examp...

mer än 9 år ago | 0

Answered
plot a complex data
The call to plot plot (img) looks wrong, because *img* is 2-D. I would expect you to be using image(), imagesc() or imsh...

mer än 9 år ago | 0

| accepted

Answered
how to apply dct code on each color plane of an RGB image
Rtrans = dct2(R); etc.

mer än 9 år ago | 0

Answered
collapse 3d data set to 2d data set using indexer for 3rd dimension without loops
[yy, xx] = ndgrid(1:size(data,1), 1:size(data,2)); collapsedData = data(sub2ind(size(data), yy, xx, zz))

mer än 9 år ago | 1

| accepted

Answered
ho to display binary img as matrix
disp(binaryImage);

mer än 9 år ago | 0

| accepted

Answered
syntax error in the matlab code in image processing
A line starting with function is the first line of a function definition. That means it must go in an m-file - usually i...

mer än 9 år ago | 1

Answered
Convert char to cell
Assuming that *ze1.Nome* is already a cell array, all you need to do is to replace the round brackets used for indexing it with ...

mer än 9 år ago | 0

| accepted

Answered
Help with imwarp and affine2d
The problem may be that imwarp() crops the output image to the transformed positions of the corners of the input image. A simple...

mer än 9 år ago | 7

| accepted

Answered
How can I process multiple image with for loop?
You are passing a string to imshow, which it interprets as a filename. However, there isn't a file called "img1". If you wish to...

mer än 9 år ago | 1

Answered
I am newbie in the matlab, may some experts tell me what are the meaning of codes or logic in this file?
For someone coming from the C++ background, I suspect one unfamiliar aspect of the code is the colon operator (:), which generat...

mer än 9 år ago | 0

Answered
Unstructured grid to structured grid
*scatteredInterpolant* may do what you need. Like this: x = [1 3 1 2.4].'; y = [12 10 11 15].'; f = [7 4 2 0].'; s...

mer än 9 år ago | 0

| accepted

Answered
Use index from max() to extract matching values from another array
Bmax = B(sub2ind(size(B), I, 1:size(B,2)))

mer än 9 år ago | 2

| accepted

Answered
need to find time difference between two time strings
Something like this: % Some data. Making the gap between d1 and d2 bigger than in your example % to provide a better che...

mer än 9 år ago | 0

Answered
How do I use a for-loop to do fft and plot the power?
The variable *Be* is not changed between iterations, so *A* will also be the same each time, so each plot will be the same as th...

mer än 9 år ago | 1

Answered
Doing DFT without using FFT function
First, let's confirm that the code you have used for the DFT is correct. Simplifying it a little for clarity (the second subscri...

mer än 9 år ago | 2

| accepted

Answered
Create a projective homography matrix with pitch/roll/yaw
[ *Edited*: example changed and transpose of matrix in call to projective2d() inserted. See comments.] It might be worth expe...

mer än 9 år ago | 7

| accepted

Answered
how to add space between matrix elements?
So another guess is that the input is in fact a double matrix, but the idea is that there ought to have been spaces between the ...

mer än 9 år ago | 2

| accepted

Answered
Plot symbols in 2014b
The circles as octagons and change of shape with line width is a recognised <https://www.mathworks.com/support/bugreports/detail...

mer än 9 år ago | 0

| accepted

Answered
Problem accessing the deformation map in image registration (using imregister, Matlab 2013a)
I think from the documentation you need imregtform() rather than imregister() to get the transform itself rather than the result...

mer än 9 år ago | 1

Answered
Error (The value assigned to variable <variable_name> might be unused)
Your code is almost impossible to read - you need to format it using the "{} Code" button. The message is a warning rather th...

mer än 9 år ago | 0

Answered
How to execute statements within functions in a random order?
One possible structure - but see my comment above. for trial = 1:3 switch phonemeorder(trial) case 1 ...

mer än 9 år ago | 0

Load more