Community Profile

photo

Adam


1,694 total contributions since 2014

Professional Interests: Signal Processing, OOP, Matlab GUI programming, Machine Learning

Adam's Badges

  • 36 Month Streak
  • Thankful Level 2
  • Guiding Light
  • Revival Level 1
  • Knowledgeable Level 4
  • First Answer
  • Solver

View details...

Contributions in
View by

Answered
How do I color points from scatter3 (3D scalar field), in accordance with their scalar values?
I don't have time to give full code, but the first option gives you what you need - i.e a single scatter3 instruction, not a mas...

8 days ago | 1

| accepted

Answered
How to show all decimals in axis?
ax.YAxis.Exponent = 0; should do this if you have a sufficiently recent version of Matlab.

12 days ago | 0

| accepted

Answered
How to make a box for comments in Matlab GUI?
uicontrol ( ... 'Units', 'pixels',... 'Position', [0 0 200 200],... 'Style','edit',... 'FontName', 'arial'...

12 days ago | 0

| accepted

Answered
Cannot Break A Function Loop With GUI Button
The attached files give an example of a start-stop GUI which works relatively simply. Don't use global variables to pass data a...

15 days ago | 0

Answered
How to vary the color according to the data ?
<https://uk.mathworks.com/matlabcentral/answers/5042-how-do-i-vary-color-along-a-2d-line This answer> may help.

21 days ago | 0

Answered
Why do nested means give different answers depending on which dimension is averaged first
It is just rounding errors. When I tried your code the offsets were of the order of 1e-16, which is close enough to 0 as to mak...

21 days ago | 1

| accepted

Answered
tmp_1(tmp_2 > 0) What does this command mean in Matlab?
tmp_2 > 0 is a logical result of the same size as tmp_2 which is true where tmp_2 is greater than 0 and false otherwise. ...

26 days ago | 0

Answered
Most efficient way to generate an array around a central value
[ flip( center:-stepsize:lower ), ( center + stepsize ):stepsize:upper ]; looks like it would work, though I haven't tested...

27 days ago | 0

Answered
Matrix dimensions must be agree
size( repmat(x, [m 1]) ) size( repmat(mu, [1 n]) ) on the command line will quickly show you the problem. The first is ...

28 days ago | 0

| accepted

Answered
Unable to perform assignment because the size of the left side is 1-by-1 and the size of the right side is 1-by-2.
Your timestep function returns this: Population_variables=[C,V]; Yet you call it twice as: V = timestep(C,V,delta_t...

1 month ago | 0

| accepted

Answered
phase value are in range of 0 to pi. how can i convert them to range of 0-256
Surely just the obvious: result = input * 256 / pi; works? Where obviously input is your data from 0-pi and result is w...

1 month ago | 0

Answered
plot the relationship between function and specific variable
a=0.2; b=0.3; thada= 0.1:1:20 tf = zeros( size( theta ) ); for n = 1:numel( thada ) t=[1+(((thada( n...

1 month ago | 0

| accepted

Answered
Convert structure to vector
vertcat( M.vector )

1 month ago | 0

| accepted

Answered
Getting "Subscript indices must either be real positive integers or logicals" error from simple calculation
You can just do an online search for floating point arithmetic or similar phrases and you will get links like, e.g <https://e...

1 month ago | 0

| accepted

Answered
How i create a matrix from a nested loop?
A = zeros( 25, 2 ); for i=1:5 for j=1:5 idx = 5 * ( i - 1 ) + j; A(idx,:) =[i, j]; end ...

2 months ago | 0

Answered
why can't i plot 2d graph with this equation ? Can anyone help me with this ? thank you.
y is a scalar, x is a vector. y needs to be the same size as x to see a meaningful plot. Alternatively you need to give a mark...

2 months ago | 0

Answered
Save a matrix in MATLAB
save( filename, 'matrixName' ) e.g. myMatrix = rand( 100, 100 ); filename = 'C:\Stuff\Somefile.mat'; save( f...

2 months ago | 0

| accepted

Answered
What those permute numbers mean?
They are the order of permutation of the dimensions, as described in doc permute So after the permutation what was the 3...

2 months ago | 0

Answered
Removing Elements from an Array based on their Position for every 3 Elements
If you are using R2015a or later then this will work: elements_n = repelem( elements_n, 3 ); Arr( Arr == elements_n ) = ...

2 months ago | 1

| accepted

Answered
How Can I create exe file of GUI program (.fig, .m)
For the second question, no, you create an exe for your top level function and it will bring in all the dependencies it needs (t...

2 months ago | 0

Answered
How to calculate standard deviation and mean ?
Use S = std( a, 'omitnan' ) M = mean( a, 'omitnan' ) if you don't want NaNs in your statistic

2 months ago | 0

Answered
How to remove callback from a java component?
Ok, I understand the problem now. I'll leave my previous answer in since it was related to the question in the title, even thou...

2 months ago | 0

| accepted

Answered
How do you save parameters for a stereo camera
doc save As the help and error says, you need to pass a string with the variable name in: save( StereoCalFileName, 'Va...

2 months ago | 0

Answered
How to remove callback from a java component?
set(handles.jsh,'StateChangedCallback',[]) seems to work fine for me when I tested it out on a java slider, using square bra...

2 months ago | 0

Answered
Find smallest imaginary values of a vector of real and complex number
Something like this would do it, albeit with some better variable naming and handling of error cases. [~, idx] = sort( nonz...

2 months ago | 1

| accepted

Answered
How to find the x&y co-ordinates of the highest peak and storing the data into a variable
If you just want the highest peak can't you just use doc max ? with the 2 output syntax to get the index which you can t...

2 months ago | 1

| accepted

Answered
UISTACK doesn't recognize handle
hImage = imagesc(output_image); % Plot image uistack( hImage, 'bottom'); You need to keep the graphics handle output of ...

2 months ago | 1

| accepted

Answered
Difference between two iteration of for loop
diff( P ) after the for loop should do this for you for all pairs of consecutive elements of P

2 months ago | 0

| accepted

Answered
Find the longest sequence of consecutive non-zero values in a vector
<https://uk.mathworks.com/matlabcentral/fileexchange/41813-runlength> or other similar run length functions should help, espe...

2 months ago | 0

Answered
insert a Background without guide
f=figure('Position',get(0,'screensize')); as=axes('Parent',f,'Units', 'pixels', 'Position',[400 200 200 150]); i...

2 months ago | 0

| accepted

Load more