Answered
why do when I perform subtraction of two the same matrices is very small results, generally is 1e-016
result(abs(result)<0.00001) = 0;

11 years ago | 0

| accepted

Answered
how can compute the log10 of the image ? what is the effect of this operation ?
It suppresses small changes on large values and highlights changes of smaller values. 1 becomes 0, 10 becomes 1, 100 becomes...

11 years ago | 0

| accepted

Answered
how to set all pixels in the range (100 , 190) to 40 for some picture called "school" ??
If you mean pixel levels in that range: school(school > 100 & school < 190) = 40;

11 years ago | 1

Answered
How can I match a clock time to a variable?
I'm not sure, but it you change the callback to have "now" as the eventdata, it should execute when the callback is called. Whet...

11 years ago | 0

Answered
How to make figure title from multiple sources when looping
title([Scenario{i} ' Variable: ' num2str(j)]); That should do it, and if not, try using Scenario(i) instead.

11 years ago | 0

| accepted

Answered
how do I vectorize a loop with multi-dimensional arrays/ outer product
A = bsxfun(@times,exp(bsxfun(@times,a,0:(t-1)),B); You need to make sure that a, 0:t-1 and B are all in the correct dimensi...

11 years ago | 0

Answered
how to import .csv file in Matlab having text in it??
This is a cheat, that works: [numbers text, everything] = xlsread('filename.csv');

11 years ago | 1

Answered
Error using reshape, Size arguments must be real integers.
You could ensure that T, and N are positive whole numbers...

11 years ago | 0

| accepted

Answered
Multidimensional array, extracting the Nth dimension
plot(1:4, squeeze(A(1,1,:))) You might need to transpose the squeezed A, I can't remember :P

11 years ago | 8

| accepted

Answered
matrix multiplication and transposing zeroing out problem
Your problem is that you're using ELEMENTWISE multiplication. Use normal, matrix multiplication. Also, if you have a DCM "T"...

11 years ago | 0

| accepted

Answered
How can i modify matrix which i retrieve from image?
Try: %if the problem is just the data type, this should work: T = f; T(T>50) = 255; If the problem is that you ...

11 years ago | 0

| accepted

Answered
Speeding up IF-FOR loop
You may be able to speed up the operation using elementwise operations, logical addressing, matrices and bsxfun

11 years ago | 0

Answered
How to use "saveas" without pressing "ok"?
Your problem is: concatFileName = inputdlg('File Name:','Save As...',1,{[Base '_SPLBRENT3_concat.mat']}); You should do...

11 years ago | 0

| accepted

Answered
Storing Matrices of different sizes
Your best option is to use a cell array: [Y{zzz}(:,:) T{zzz}(:,:)] = process(tbs,sigmapix); Alternatively: [Ytemp Tte...

11 years ago | 0

| accepted

Answered
Strings with changing length and cases
Assuming that you've shown us "everything". Theres a better way: x = 8 - (Astr(3) == '2') - 2*(Astr(3) == '7') - 3*(Astr(3) =...

11 years ago | 0

Answered
Using cases with strings
What you put after the case needs to be every valid option to enter that case, and NOT an operation. switch Astr([2:4,5:7])...

11 years ago | 0

| accepted

Answered
xlsread with changing Excel name
Step 1: Get your list of files: dir_struct = dir('*.xlsx'); % (with or without a path, as needed.) Step 2: Get the revisi...

11 years ago | 0

| accepted

Answered
how can I let the string variable change in a loop
try using num2str(i) instead of 'i'.

11 years ago | 0

| accepted

Answered
Simple Question about Optimization of Nested IF-FOR loops
Try: DoseCubeU(NY,NX,NZ) = 0; % or any suitable initialisation if iPointsinSlice>0; DoseCubeU(SliceMaskUr(m,l)==1,:) ...

11 years ago | 0

Answered
Logical indexing with matrix
Try: July=mean(Price(JulyIDX,:));

11 years ago | 0

| accepted

Answered
Collapsing integer data into consecutive integers?
Ex = [ 0 1 4 4 1 5 8 1 4]; % A row V = unique(Ex); % should be a row L = bsxfun(@eq,Ex,V); Collapsed = [0:(numel(V)-1)]...

11 years ago | 1

Answered
Saving multiple versions of GUI's?
Try a version control piece of software? Subversion/Tortoise, Dimensions, etc. Try using separate folders for different v...

11 years ago | 0

| accepted

Answered
estimate memory size in matlab
The generic size of any variable is: sum of (each element of the array * bytes in that element) + some overhead. Normal ar...

11 years ago | 2

Answered
Saving Lots of Plots as Variable Changes in Time
for a = 400:5:500 % do stuff to get your results. figure(n) plot(output,'r'); axis([0 max(output)+10 -20 400]) ...

11 years ago | 0

| accepted

Answered
Problem with defining a matrix of variables
That error is because you have assigned a STRING to p. Assign it with. p = str2double(get(hObject, 'String'))

11 years ago | 0

| accepted

Answered
how to exract varying matrix data
p(y(i),:)= X(1:y(i),:) Is trying to put a y(i) by "n" matrix into a 1 by "n" matrix, which CANNOT work. p(y(i),:)= X(y(...

11 years ago | 0

| accepted

Answered
how to cancel specific values in 3d array
array(array == Q) = 0;

11 years ago | 0

| accepted

Answered
How to average multiple vectors of different lengths?
When you DON'T have a measurement, ensure that it is "NaN", when you come to take the average, use "nanmean", which ignores the ...

11 years ago | 0

Answered
Comparing data from previous iteration with data from this iteration
Adash = Data; copies the WHOLE of data into Adash. When you then start the loop at the top again, and "Data(i) = Adash - s...", ...

11 years ago | 1

Answered
MATLAB and other software?
You can also use dde methods. Depending on what you're doing with what.

11 years ago | 0

Load more