Réponse apportée
I have 12 columns in excel that I want to import using one command.
If it fits in memory you may be best loading in full range using e.g. filename = 'someFile.xlsx'; xlRange = 'B10...

presque 10 ans il y a | 0

| A accepté

Réponse apportée
Why is the inputParser method addParamValue not recommended and how does it differ from addParameter?
addParameterValue is a function from R2007b, addParameter was added in R2013b clearly with the intention of replacing it. So ...

presque 10 ans il y a | 0

Réponse apportée
How can I select a radio button?
Why would the user need to push it again? Do you have functionality under the radio button that triggers when they press it? I...

presque 10 ans il y a | 0

Réponse apportée
How to use AND in an if loop to find the first repeated value
for j = 1:length( allowed_energies ) idx = find( value(:,3) == allowed_energies(j), 1 ); result = value( idx, 6 ) ...

presque 10 ans il y a | 0

| A accepté

Réponse apportée
How do I get an extra attempt to activate my Matlab using activation key, given I screwed up the first time?
If you are on windows you should just be able to type 'Activate' in the main search box and one of the options that should show ...

presque 10 ans il y a | 0

| A accepté

Réponse apportée
How to create a parameter panel in matlab figure?
doc uipanel contains an example. doc uicontrol gives more examples for the actual controls themselves. Or if you...

presque 10 ans il y a | 0

Réponse apportée
Variable Strings in popup menu
Yes, just set the popupmenu string programmatically. Doesn't matter if you are in GUIDE or not, you can still set the popupmenu...

presque 10 ans il y a | 0

A résolu


Create times-tables
At one time or another, we all had to memorize boring times tables. 5 times 5 is 25. 5 times 6 is 30. 12 times 12 is way more th...

presque 10 ans il y a

A résolu


Determine whether a vector is monotonically increasing
Return true if the elements of the input vector increase monotonically (i.e. each element is larger than the previous). Return f...

presque 10 ans il y a

A résolu


Find all elements less than 0 or greater than 10 and replace them with NaN
Given an input vector x, find all elements of x less than 0 or greater than 10 and replace them with NaN. Example: Input ...

presque 10 ans il y a

A résolu


Triangle Numbers
Triangle numbers are the sums of successive integers. So 6 is a triangle number because 6 = 1 + 2 + 3 which can be displa...

presque 10 ans il y a

Réponse apportée
i want add a value to every element that is less than zero in my vector.
myVec( myVec < 0 ) = myVec( myVec < 0 ) + 180;

presque 10 ans il y a | 0

| A accepté

Réponse apportée
Copy an axes from a figure to an axes in a gui
doc copyobj is what you will likely have to use. I have never used it myself so I don't know what kind of limitations it h...

presque 10 ans il y a | 0

Réponse apportée
Simply entering the debugger during execution of MATLAB GUI fixes error that persists during normal execution
Have you tried inserting a short pause instruction e.g. pause( 0.5 ) between plotting and setting the figure f to be act...

presque 10 ans il y a | 0

| A accepté

Réponse apportée
Updating a figure in a GUI pops up a new figure, what's wrong?
'candle' looks like a very old function and does not seem to have a version that allows you to plot on a specified axes, but plo...

presque 10 ans il y a | 0

Réponse apportée
Why should one use class and enumeration instead of structures? and what effect MATLAB will result after using class and enumeration?
I always use classes over structures as they are a lot more different in Matlab than e.g. C++. A struct is just a christmas t...

presque 10 ans il y a | 1

| A accepté

Réponse apportée
norm calculation using for loop
n = norm( x ); does it without a loop. There is no reason to do it with a loop. Even if you don't use norm you would stil...

presque 10 ans il y a | 1

| A accepté

Réponse apportée
How to plot cell array data?
cellfun( @(x) scatter3( x(:,1), x(:,2), x(:,3) ), RSD_c ) should work, though I haven't double-checked the syntax in Matlab...

presque 10 ans il y a | 0

Réponse apportée
How to decompose Structure into its constituent variables from GUI?
If you saved the variables as individual variables and you just load them as: load( 'someFile.mat' ) then you will get a...

presque 10 ans il y a | 0

Réponse apportée
Matlab, can you create a separate font size for the x tick mark label and y tick mark label?
If you are using R2015b or later you can do the following: hAxes.XAxis.FontSize = 12; hAxes.YAxis.FontSize = 20; for ...

presque 10 ans il y a | 2

| A accepté

Réponse apportée
problem with enumeration class
You have to create an object of an enumeration class by defining the enumeration e.g. myEnumObj = classenum.Feb; As far ...

presque 10 ans il y a | 0

| A accepté

Réponse apportée
Confusion regarding the range of gray levels possible in Matlab
What code are you using to produce these? I assume just an imshow? The fact that the range for double is 0-1 is exactly why ...

presque 10 ans il y a | 0

| A accepté

Réponse apportée
find the number of seconds between two times
date(1) cannot contain a full string. If date is that string then date(1) is just '1'. Alternatively if date is a cell array y...

presque 10 ans il y a | 0

Réponse apportée
How to read specific value from a text file?
fscanf( fid, '%f', [1 1] ) will do the job if you just want the first value.

presque 10 ans il y a | 0

| A accepté

Réponse apportée
auto resize static text in GUI
There is a 'FontUnits' property which needs to be set to 'normalized' for this to work. I seem to remember I abandoned this b...

presque 10 ans il y a | 0

Réponse apportée
Msgbox pop up behind GUI
Move it into the Output_Fcn instead. In the OpeningFcn it gets created before the GUI creation is completed so when that GUI ...

presque 10 ans il y a | 1

| A accepté

Réponse apportée
Running the matlab class example
t = Testpoint; % Create the object t.expectedResult = 7; % Set the property t.expectedResult % Get the property for e...

presque 10 ans il y a | 0

| A accepté

Réponse apportée
How to find the index in array?
Left_A = find( A == 1, 1 ); Right_A = find( A == 1, 1, 'last' );

presque 10 ans il y a | 0

| A accepté

Réponse apportée
Calculate the percentage of zeros and ones each row of matrix
percentOnes = sum( myMatrix, 2 ) / 3 * 100; percentZeros = 100 - percentOnes; That is, assuming what you mean by 'I want...

presque 10 ans il y a | 0

| A accepté

Réponse apportée
Efficient calculation of 3d matrix of distances
[x, y, z] = meshgrid( (j-jp)^2, (i-ip)^2, (k-kp)^2 ); distSq = x + y + z; MDistances = sqrt( distSq ); should give th...

presque 10 ans il y a | 0

| A accepté

Charger plus