Respondida
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...

casi 10 años hace | 0

| aceptada

Respondida
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 ...

casi 10 años hace | 0

Respondida
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...

casi 10 años hace | 0

Respondida
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 ) ...

casi 10 años hace | 0

| aceptada

Respondida
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 ...

casi 10 años hace | 0

| aceptada

Respondida
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...

casi 10 años hace | 0

Respondida
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...

alrededor de 10 años hace | 0

Resuelto


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...

alrededor de 10 años hace

Resuelto


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...

alrededor de 10 años hace

Resuelto


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 ...

alrededor de 10 años hace

Resuelto


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...

alrededor de 10 años hace

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

alrededor de 10 años hace | 0

| aceptada

Respondida
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...

alrededor de 10 años hace | 0

Respondida
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...

alrededor de 10 años hace | 0

| aceptada

Respondida
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...

alrededor de 10 años hace | 0

Respondida
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...

alrededor de 10 años hace | 1

| aceptada

Respondida
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...

alrededor de 10 años hace | 1

| aceptada

Respondida
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...

alrededor de 10 años hace | 0

Respondida
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...

alrededor de 10 años hace | 0

Respondida
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 ...

alrededor de 10 años hace | 2

| aceptada

Respondida
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 ...

alrededor de 10 años hace | 0

| aceptada

Respondida
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 ...

alrededor de 10 años hace | 0

| aceptada

Respondida
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...

alrededor de 10 años hace | 0

Respondida
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.

alrededor de 10 años hace | 0

| aceptada

Respondida
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...

alrededor de 10 años hace | 0

Respondida
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 ...

alrededor de 10 años hace | 1

| aceptada

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

alrededor de 10 años hace | 0

| aceptada

Respondida
How to find the index in array?
Left_A = find( A == 1, 1 ); Right_A = find( A == 1, 1, 'last' );

alrededor de 10 años hace | 0

| aceptada

Respondida
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...

alrededor de 10 años hace | 0

| aceptada

Respondida
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...

alrededor de 10 años hace | 0

| aceptada

Cargar más