Answered
Plotting piece-wise functions with absolute value????
To fix your existing code, with the loop, you need y(k) = abs(x(k)); and y(k) = x(k).^2; Your condition x(k) > 2...

nästan 10 år ago | 0

Answered
subtract two identical float number it gives a very small number not a zero
It's round-off error. See, for example <http://www.mathworks.com/matlabcentral/answers/102419-how-do-i-determine-if-the-error-in...

nästan 10 år ago | 0

Submitted


Rotate images with automatic cropping
The blank triangles that appear in the corners of rotated images are cropped away.

nästan 10 år ago | 2 downloads |

Thumbnail

Answered
How to upscale the image and make it higher resolution?
You can't truly increase the resolution of an image, because in making the sampled digital image information at higher resolutio...

nästan 10 år ago | 1

| accepted

Answered
How can I use imfindcircles function to find circle centers without sorting
Your comment suggests that you *do* want the results to be sorted, but according to position rather than strength. (Strength mea...

nästan 10 år ago | 3

| accepted

Answered
Help with scatteredInterpolant: masking and meshgrid alternatives
A quick thought - would it help to switch off extrapolation? Use F = scatteredInterpolant(X,Y,Z,C,'nearest','none');

nästan 10 år ago | 2

Answered
how can convert matrix of image from douple to single
If imageDouble is the original image, use imageSingle = single(imageDouble);

nästan 10 år ago | 1

| accepted

Answered
Dear All, I am really new to matlab and dont know how to run this code. can anybody guide me stepwise? code courtesy: http://www.cs.sfu.ca/~hamarneh/software/livewire/lwcontour_sven.m
Probably the best place to start is the <http://uk.mathworks.com/help/matlab/getting-started-with-matlab.html getting started gu...

nästan 10 år ago | 1

Answered
How can I create a circle in the middle of the figure which do not touch axis..??
Try adding margin = 2; % how much space to leave axis([x x y y] + [-1 1 -1 1]*(r+margin));

nästan 10 år ago | 0

Answered
Looping both rows and columns
Try putting the line n = 1; between the two "while" statements. This variable needs to start at the beginning for each v...

nästan 10 år ago | 1

| accepted

Answered
Approximate the variable in the workspace to one digite ?
If you mean you have 1000 values stored in an array, and you want to change the stored values to be rounded to one decimal place...

nästan 10 år ago | 1

| accepted

Answered
I am trying to write code for canny edge detection but it is not giving exact output like inbuilt function.can any one help me
The differences are quite small, and I don't think there is very much wrong. My own implementation of the Canny edge detector al...

nästan 10 år ago | 0

| accepted

Answered
add circles to starting and ending point of a line
Here is some test data, to make a plot that looks a bit like yours: x = 2:0.1:18; y1 = 20 - 0.05 * x; y2 = y1 - 0.2 *...

nästan 10 år ago | 0

Answered
How to form a matrix
The question doesn't entirely make sense. You say you want to record the value of i when i equals 4, 6, 9, 12. Taking the questi...

nästan 10 år ago | 0

| accepted

Answered
Creating an indexed array of images having the same size
It looks like arr is already a non-cell array. Assuming you don't need the old value of arr, assign a cell array to it before tr...

nästan 10 år ago | 0

Answered
How to read or extract modis HDF aerosol data .
I've been using <http://www.mathworks.com/help/matlab/ref/hdfinfo.html hdfinfo> with 'eos' as the second argument and <http://ww...

nästan 10 år ago | 1

Question


Current folder window: how does "MATLAB Code File" differ from "Script"
I'm puzzled by the listing in my current folder window. I hadn't noticed a file type called "MATLAB Code File" before, and I'm t...

nästan 10 år ago | 1 answer | 0

1

answer

Answered
Indexing a 3D array with a vector
c = b(:,3,:); c(c > 5) = -100; b(:,3,:) = c;

nästan 10 år ago | 0

| accepted

Submitted


Gradients with Gaussian smoothing
Grey-level gradients are estimated using Gaussian smoothing followed by symmetric differencing.

nästan 10 år ago | 8 downloads |

Answered
How can I get the values of a circular region around a particular pixel?
Assuming: * your image is grayscale and is called img; * the central pixel is at column x and row y; * the radius of the ci...

nästan 10 år ago | 2

| accepted

Answered
Plot y^2 = x^2 + 1 (The expression to the left of the equals sign is not a valid target for an assignment.)
The error message says it all: you can't assign something to y1^2. Remember that in a programming language, the "=" operator isn...

nästan 10 år ago | 1

Answered
how to smooth data?
It's impossible to say what the best method is without a model of spike formation and a function that quantifies the cost of res...

nästan 10 år ago | 0

Answered
Finding the index of each last field of an array that contains a value between two set values
It may be that you just need to use & instead of &&.

nästan 10 år ago | 1

| accepted

Answered
How to add an unknown amount of number in matlab?
The trick is to add on to the result vector each time through the loop. I don't understand what sv is in your code, and I'm n...

nästan 10 år ago | 0

Answered
Attempted to access x(-36); index must be a positive integer or logical.?
Image Analyst's comment is correct - working code and the values for the variables should be given. Nevertheless, I can make a g...

nästan 10 år ago | 2

Answered
Concatenating a cell array
I guess you mean that you would like to delete rows 1 and 4. If that's right, here's one way: % set up the test data dat...

ungefär 10 år ago | 2

| accepted

Answered
Creating a circle with segments of colour
Not sure what you mean by "adjustable in colour". The code below does the full colour wheel - it should give you a starting poin...

ungefär 10 år ago | 2

| accepted

Answered
How to get If Then statements to work on a vector
y = x; y(x > 5) = 5;

ungefär 10 år ago | 0

| accepted

Answered
Why, oh why does isempty return 0? Questions related to dataset access and return from strfind.
The two earlier answers are both correct. Another suggestion which might help is to use ismember() instead of ~isempty(strfind()...

ungefär 10 år ago | 1

Answered
If Condition with array of elements
You should try to state more clearly what is not working. Give an example set of initial values, say what you expect the result ...

ungefär 10 år ago | 1

Load more