已回答
Containers Map saving more than one value
You can save a cell array or an object array as the 'value' for a given key if you set up the key type as 'any' (which is the de...

5 years 前 | 1

已回答
shaperead function not available?
I don't know where you came across the shaperead function, but a very quick search shows that it requires the Mapping toolbox...

5 years 前 | 0

| 已接受

已回答
how to create an vector contains 10000 random values that uniformly distributed with mean 1 and variance 10 ?
https://uk.mathworks.com/help/matlab/math/random-numbers-with-specific-mean-and-variance.html (that was from a 10s search in th...

5 years 前 | 0

已回答
How to add image overlay in GUIDE ?
(Original comment prepended to the answer for the last comment): The CData is of your original image. If you add a second im...

5 years 前 | 0

| 已接受

已回答
How to use a boolean?
thrust = rocketOn * 1950 And just set rocketOn to true or false as appropriate, e.g. >> rocketOn = true; >> thrust = rocket...

5 years 前 | 1

| 已接受

已回答
GUI Warning: Directory not founded
Don't use global variables. They are very unreliable. Just share data between callbacks instead. It's anyone's guess what mig...

5 years 前 | 1

| 已接受

已回答
Adding a marker to Data Marker to Heatmap (via imagesc)
I guess you could take the odd approach of making the axes green (when you plot an image the axes should be entirely hidden so t...

5 years 前 | 0

| 已接受

已回答
Fastest pairwise row sums
C = repelem( A, size( B, 1 ), 1 ) + repmat( B, size( A, 1 ), 1 ); Should be the same for gpuArrays too. Whether it is fastest ...

5 years 前 | 0

| 已接受

已回答
Editing component tag in App Designer
You should have a 'Component Browser' (mine is top right of the screen with default layout) with your components in a tree under...

5 years 前 | 1

已回答
Checking for decimals values in input
validateattributes( r, { 'numeric' }, { 'scalar', 'integer' } )

5 years 前 | 0

已回答
Reading of Slider into text box GUI
Something like this would do the job, assuming you on;y want to set the text box value when the axes limits are exactly what you...

5 years 前 | 0

已回答
Accessing elements of a 3-D cell array
myCell{ :, 1, 98 }

5 years 前 | 0

| 已接受

已回答
I want to put an 'ms' in my matlab GUI. But I don't know how to search for the solutions.
sprintf( '%f ms', EncTime * 1000 )

5 years 前 | 0

| 已接受

已回答
matlab.unittest.TestCase availability for Matlab version R2012a
It wasn't introduced until Matlab R2013a so is not available in earlier versions.

5 years 前 | 0

已回答
Access different elements of matrix
B = A( :, :, :, [2:5, 7] );

5 years 前 | 0

| 已接受

已回答
'disp' equivalent to be used with Matlab Coder
doc fprintf should work with Coder.

5 years 前 | 1

| 已接受

已回答
3D Arrays finding an address in a element
doc ind2sub doc sub2ind will convert between n-dimensional subscripts and linear indices. In Matlab that is. Your declaratio...

5 years 前 | 1

已回答
How do I change the x and y coordinates in a colormap?
doc imagesc shows that the first two arguments can be the x data and the y data if you use the 3-argument syntax or property-va...

5 years 前 | 1

已回答
Simplyfing code by removing from script and adding to function
This code is the same in both cases so should definitely go inside a function, though you may wish to pass stroke in as an input...

5 years 前 | 0

已回答
if statement for colour coding data
Create a mask: greenDataIdx = Depth <= 11.9; plot( Lat( greenDataIdx ), Long( greenDataIdx ), 'g*' ) hold on ... Then plo...

5 years 前 | 0

| 已接受

已回答
How can one remove y-axis ticks on imagesc but keep labels?
hAxes.YAxis.TickLength = [0 0]; Following on from what you said in your own question. That seems to work. Assuming you are in...

5 years 前 | 1

| 已接受

已回答
Error using * Inner matrix dimensions must agree.
Unless you meant matrix multiplication, in which case you likely need to transpose one side of the * then what you need is .* fo...

5 years 前 | 1

| 已接受

已回答
How do I combine these answers into a matrix?
diff(A) will do this.

5 years 前 | 0

| 已接受

已回答
In my gui3 , i want to break loop when i close the gui figure window
isgraphics( handles.figure1 ) will tell you if the figure is still active or has been deleted.

5 years 前 | 2

已回答
Get handles from GUI img
Add handles.imgRGB = imgRGB guidata(h, handles) in your above function, then if you get handles in your other function you ...

5 years 前 | 1

| 已接受

已回答
Editing colors in a colormap
How do you have your colourmap currently? If you have it as an e.g. 256x3 matrix of colours then you can just set e.g. myColou...

5 years 前 | 0

已回答
How to change a sign of elements in a matrix for each coulmn separatly ?
vny = v; vny( 2:2:end) = -vny( 2:2:end); should work

5 years 前 | 2

| 已接受

已回答
Mean/average of a variable
M = mean( squeeze( P(a,:,:) ) should give what you want

5 years 前 | 0

已回答
Use of handle in matlab 2013b
function h = counter persistent x if isempty( x ) x=0; end h=addone; function y=addone x=x+1; y=x; ...

5 years 前 | 0

已回答
how to return values from .mlapp to the .m caller
An App designer UI is just a class. You can add functions and properties to this however you wish and access these from the sco...

5 years 前 | 2

| 已接受

加载更多