Réponse apportée
how to remove repeating columns in a matrix
Just transpose the matrix and use unique(A, 'rows' )

presque 10 ans il y a | 1

Réponse apportée
Extracton of rows in a matrix based on a specific column value
mat = rand(10,3); res = mat( mat(:,3) <= 0.5, : );

presque 10 ans il y a | 0

Réponse apportée
Function that deletes a row in a matrix
mat = rand(3); n = 2; mat(2,:) = [];

presque 10 ans il y a | 0

| A accepté

Réponse apportée
I am trying to use range on xlsread function, but it appears I am on basic mode, how can I change this?
From the help: "If your computer does not have Excel for Windows®, xlsread automatically operates in basic import mode" I ass...

presque 10 ans il y a | 0

Réponse apportée
How to change the linewidth of a curve in a graph by using code?
Well, you haven't plotted anything with that code, but assuming you do: hLine = plot( x, y ); hLine.LineWidth = 2; %...

presque 10 ans il y a | 0

Réponse apportée
Changing class properties with callback function
Derive your class from handle is the easiest way: classdef C_MinFigureControl < handle This brings in a few differences ...

presque 10 ans il y a | 0

| A accepté

Réponse apportée
Previous Releases of MATLAB
Go to 'My Account' from the top right of Mathworks website and click the download symbol next to your license. You should get t...

presque 10 ans il y a | 0

Réponse apportée
While loop constraint has to be true for every variable
s=s(i)+1; Is going to overwrite s. Surely you want s(i) = s(i) + 1 instead. This line Results(end+1,:) = [...

presque 10 ans il y a | 0

Réponse apportée
First value of possible empty array
if isempty(A) works just as well as if isempty(A) == 0 which is redundant. If your array is empty though then yo...

presque 10 ans il y a | 0

Réponse apportée
Static variables in MATLAB
You can use <https://uk.mathworks.com/help/matlab/ref/persistent.html persistent> variables if that is what you mean, but only u...

presque 10 ans il y a | 1

Réponse apportée
if statement inside a for loop not working
The representation of the results of floating point maths is not 100% accurate so you should never do a straight == between a nu...

presque 10 ans il y a | 0

| A accepté

Réponse apportée
How can I make an array with a function that defines every element?
You don't need a function, just 1 ./ theta_i will do

presque 10 ans il y a | 1

Réponse apportée
Mean of neighbor pixel
If you are finding all 8 neighbours then it doesn't make a difference which is x,y and rows, columns, but your confusion and tha...

presque 10 ans il y a | 0

Réponse apportée
Why does the 3D plot viewer skew as I rotate the point of view?
There is a right-click option when you are in Rotate mode: Rotate Options -> Fixed Aspect Ratio Axes. axis( hAxes, 'vis3d'...

presque 10 ans il y a | 0

Réponse apportée
Error: Subscript indices must either be real positive integers or logicals.
a = [ 1, 2, -1, 1, 2, 3]; x(a,f) = a.*cos(2*pi*f*t); a contains a negative number which is not a legal index into th...

presque 10 ans il y a | 0

Réponse apportée
Is Clearing Redundant Cells Necessary
What do you mean by a sub-script? Scripts use the base workspace so if you call one script from another (which I assume is what...

presque 10 ans il y a | 0

Réponse apportée
Can i use int8 and double in equation and get double as answer?
Cast t to double i.e. double(t)

presque 10 ans il y a | 1

| A accepté

Réponse apportée
how i can use multiple axes in GUI ,to set different plots to different axes at a same time ?
The plot function has an overload that takes the axes handle as first argument. You should always use this to plot to an explic...

presque 10 ans il y a | 0

Réponse apportée
Apply different Functions on same data using GPU simultaneously
The GPU is not well optimised for running different functions on data in parallel as far as I am aware so that wouldn't be faste...

presque 10 ans il y a | 0

Réponse apportée
selecting a smaller array from a bigger one
result = r(21:60, 21:70, 31:50 ); I'm not sure I see what the problem is?

presque 10 ans il y a | 0

| A accepté

Réponse apportée
Label more than 7 lines in a plot
You can set your own colours for lines you plot and you can also specify the colours used on an axes by setting the ColorOrd...

presque 10 ans il y a | 0

Réponse apportée
Find match for a pair of rows in cell arrays
[C, ia, ic] = unique( alfa ); should give you this information. The C vector gives the characters and the ic vector tells ...

presque 10 ans il y a | 0

Réponse apportée
Array values not corresponding to condition
You are doing your changes in-place and in sequence, so those that were caught by the 1st condition get changed to 1 and then al...

presque 10 ans il y a | 0

Réponse apportée
I can detect fire in a pic but ı can not give 'fire alarm' by using 'if' and 'msgbox', How can ı give fire alarm with my codes below.
R=img_ycbcr(:,:,1); returns a 2d matrix. R==0 will never return true for this. If you want to check that all values are 0 t...

presque 10 ans il y a | 1

Réponse apportée
How can I set a colorbar for single values corresponding to multiple polygons created with geoshape?
Do you mean you want every polygon to be a different colour? And is it then impossible for two polygons to have the same sample...

presque 10 ans il y a | 0

| A accepté

Réponse apportée
[DISCONTINUED] MATLAB Answers Wish-list #4 (and bug reports)
Not so much a wish, just an oddity I noticed. I set my profile to not allow me to be contactable by e-mail etc and I deselect t...

presque 10 ans il y a | 1

Réponse apportée
How to check if right axis is visible?
function isVisible = isYAxisVisibleAtLocation( hAxes, location ) assert( isgraphics( gca, 'axes' ) ); location = val...

presque 10 ans il y a | 1

Réponse apportée
why haart2 function isn't found in matlab ?
So far as I can see the function in the Wavelet Toolbox is named haart so I'm not sure what your haar function is, but i...

presque 10 ans il y a | 0

Réponse apportée
Change 1 to -1 in a matrix
m = ones(4); r = rand(4) - 0.5; m = m .* sign( r ); is one of many ways to do it.

presque 10 ans il y a | 1

| A accepté

Réponse apportée
Putting 1 around the matrix
a = zeros(3); b = padarray( a, [1 1], 1 ); would put 1s all the way round, but this produces a 5x5 matrix. A 4x4 matrix...

presque 10 ans il y a | 0

Charger plus