Answered
What is the range of double??
No. Some image processing functions will need it to be converted. The range of double is plus and minus 0, 10^-318 to 10...

11 years ago | 0

Answered
How can I make my simulink matlab function compute internally in single format instead of double
The simple answer is to ensure that any constants you use internally in the function are single format. single * single = sin...

11 years ago | 1

Answered
How to compute a gaussian random noise with Matlab R2010a ?
If you mean generate random numbers in a gaussian distribution, whats wrong with randn()?

11 years ago | 0

| accepted

Answered
xticks showing latitude and longitude
set(axis_handle,'YTickLabel',{label1,label2...}) Coming up with the labels is up to you.

11 years ago | 0

| accepted

Answered
Initialize Variables in a Function
If you want a function to return those variables to the workspace, you'll need to declare it as: function [mass speed veloci...

11 years ago | 0

| accepted

Answered
image masking by position
segment = I(x1:x2,y1:y2);

11 years ago | 0

Answered
Raising to the power of large numbers is giving me the wrong answer?
Matlab, by default, uses double precision numbers, which puts the useful number of significant figures at around 16. - More than...

11 years ago | 0

Answered
Why this function return empty matrix?
Because val is not what you think it is. - It is probably 0.

11 years ago | 0

Answered
Size of exported pdf with given font size
When using report generator to make pdfs, I have found that changing the "Paperposition" property of the figure changes the size...

11 years ago | 0

Answered
How to write a program to get probability that two cards same number and same color?
If you're asking the question: You take the Ace of spades from a standard 52 card deck, and you want to know the likelihood t...

11 years ago | 0

Answered
what is this error? and what is my mistake?
The error is that you are trying to put more than ONE element into a single element of an array. Either change x(i) to x(i,:...

11 years ago | 0

Answered
Transferring values from one gui to another gui
You can pass values around using get, set and using known handles. - get(handle,'children') and get(handle,'parent') can let you...

11 years ago | 0

Answered
create a grid fuction
It is because in your function declaration, you do not define inputs. function kgrid = test_environment(nx,dx,ny,dy,nz,dz) ...

11 years ago | 0

Answered
Can anyone help me improve this code?
A few things come to mind. 1. Only do half of the loops as you point out, V = V', so you only need to do one triangle of it. ...

11 years ago | 0

Answered
How to list the values that are contained within each bin
You can get a single set via: c = x( (y>bin_min) & (y < bin_max) ); You will need to provide the bin_min and bin_max, bu...

11 years ago | 0

| accepted

Answered
How to Graph structures
Move the figure command OUTSIDE the loop to only get 1 figure.

11 years ago | 0

Answered
need help for image restoration algorithm based on neighboring pixel
If you know the index of the bad pixel, a method would be: image(index) = mean(image([index-1 index+1 index+rows index-rows]...

11 years ago | 0

| accepted

Answered
Extract the first negative value in a matrix column
for i = 1:cols Answer = A(find(A(:,i)<0,1),i); if isempty(Answer) Out(i) = 0; else Out(i) = Answer; end e...

11 years ago | 0

Answered
How can I write any cell data into txt file as they appear.
for j = 1:size(data,1) for i = 1:size(data,2) if ischar(data{j,i}) fwrite(fid,[data{j,i} ' '],'char'); else ...

11 years ago | 0

| accepted

Answered
what is the meaning of this line? BW = im2bw(GRAY, threshold);
That line compares your image, to a threshold, and produces an array of the same size, containing "false" where the image is les...

11 years ago | 0

Answered
How can I modify the Y-axis of an existing plot in a .fig file?
Use |get(fig_no,'children')| to identify all of the items on the fig, inlcuding the axes Use |get(axis_no,'children')| to ide...

11 years ago | 2

| accepted

Answered
Multiplying/Dividing a Column Vector with a Constant
" ./ .\ .^ and .* " are elementwise operations.

11 years ago | 0

Answered
I have created a video object to plot a graph which progresses with time. I have a large number of plotting data points due to which the graph progresses slowly. How can I reduce this time?
Instead of calling the figure, the subplot, and then freshly plotting the line and the most recent point, try: a = plot(A1(1)...

11 years ago | 0

Answered
how can i combine two different matrics with different size become one matric that fixed size
Take your pick: C(15) = 0; C(1:numel(A)) = A; C((numel(A)+1):(1+numel(A)+numel(B))) = B; C = [A, B, zeros(1,desired_s...

11 years ago | 0

Answered
Sharing Data Between GUI...
You can, at select points in your code, save a bunch of parameters to a file with a name you have chosen, to record the "current...

11 years ago | 0

Answered
About .tif image processing
I don't know what your imagery is, so telling you how to extract it's DN is not trivial. Your image is 3x 2D arrays, where e...

11 years ago | 0

Answered
Speed of a MATLAB code
You can measure the time taken to execute a chunk of code using "now", or tic and toc, tic; codegoeshere; toc % prints...

11 years ago | 2

Answered
How much memory is occupied by 2-D look up table?
A 2-D look up table should consist of: 2 vectors, one "n"*8 bytes, another "m"*8 bytes (8 bytes assuming double format number...

11 years ago | 0

Answered
Copyfile with long path names
I'm not sure how you can reasonably use this or if it still exists in Win7. There is a "short" name for every file and folder...

11 years ago | 0

Load more