Respondida
Issue with UI Components Not Resizing Correctly on Window Maximize in App Designer
The thing I would do (and what I generally do in any GUI) is to turn AutoResizeChildren 'off' and write my own SizeChangedFcn fo...

4 días hace | 0

Respondida
How to get all possible combination With the total number of possible combination for "n" variables that can take different values
a = [1 99]; b = [2 30 700]; c = [4 55 666 8888]; vars = {a,b,c}; n = numel(vars); out = cell(1,n); [out{:}] = ndgrid(var...

4 días hace | 0

Respondida
How to write output data in excel csv files?
After the for loops: writematrix(avg_village_ndvi,'c:\data\ndvi_predictors.csv') writematrix(avge_village_ndre1,'c:\data\ndre1...

4 días hace | 0

| aceptada

Respondida
Control and use greek letter of the contour diagrams
Here's how you can incorporate a Greek letter into the contour labels: x = 10.^(0:6); y = 0:10:200; z = (1+y).*log10(x.')/400...

4 días hace | 0

Respondida
Novice question - Push button to display y intercept
The reason the red line disappears when you move a slider is that plot replaces whatever is in the axes with the newly plotted l...

4 días hace | 0

| aceptada

Respondida
Figure open on every run
You should use ishandle, ishghandle, or isgraphics instead of isvalid. Also, make sure you don't have a clear or clear all stat...

4 días hace | 0

| aceptada

Respondida
Changing live uitable row colours depending on value.
Since you are coloring by row, setting the uitable's BackgroundColor may work for you. You can use a matrix of colors. Example:...

4 días hace | 0

Respondida
yyaxis causing values on y-axes to become incorrect
The lines corresponding to the right y-axis are all plotted with LineStyle 'none' and no marker, so they don't appear at all. In...

4 días hace | 1

| aceptada

Respondida
understanding quiver and plotting arrows with direction and speed
U and V are supposed to be the X- and Y-components of the quiver arrows, but you are using direction and speed directly for U an...

4 días hace | 1

| aceptada

Respondida
Can the robot be displayed in the UIAxes of the app designer in Matlab2023a
Maybe you have to use an axes (rather than a uiaxes)? You can put an axes in a uifigure, but you may have to do it programmatic...

5 días hace | 1

| aceptada

Respondida
I got Inf when calculating 13959^475, how can I solve this problem?
c=13959; d=475; n=20711; r = 1; for ii = 1:d r = mod(r*c,n); end r Reference: https://en.m.wikipedia.org/wiki/Modu...

5 días hace | 3

Respondida
code to calculate embodied energy
Mass = [10 50 30]; % mass of three materials Ei = [ 4 2 1]; % embodied energy per unit mass for those materials ...

6 días hace | 0

| aceptada

Respondida
How do I shade area in between two functions?
kp = -10:0.1:10; % ki = zeros(size(kp)); % for iter = 1:length(kp) % ki(iter) = 221*kp(iter) + 1326 % end ki = 221*kp +...

6 días hace | 0

| aceptada

Respondida
How to find "k" nearest elements that meet a condition from an element in a categorical column vector.
Try this: predClass = categorical(["N";"N";"A";"N";"N";"N";"A"]); k = 2; % find where there is an 'N' immediately precede...

6 días hace | 0

| aceptada

Respondida
Field reference for multiple structure elements that is followed by more reference blocks is an error. and undefined function histogram
Regarding the error: Field reference for multiple structure elements that is followed by more reference blocks is an error. Er...

7 días hace | 0

| aceptada

Respondida
if-statements for reassigning values
Use if N >= -20 && N <= 20 And remove the space in "else if".

7 días hace | 1

| aceptada

Respondida
Taylor Series Expansions for sin(x)
2i should be 2*i. And you need to accumulate the sum; as it is now sum1 is only the current term and it's never added to anythi...

7 días hace | 1

| aceptada

Respondida
Datacursor to show Z axis String Info with Precise X axis information
tickLabel is a scalar cell array, so don't index it with 3. Use 1 instead: output_txt{end+1} = ['Z', valueFormat tickLabel{1} r...

8 días hace | 0

| aceptada

Respondida
Max indices in for loop not changing after initial run (index exceeds the number or array elements)
Looks like you already found an apparent solution, but I'll go ahead and point out the things I noticed, since they may still be...

8 días hace | 2

| aceptada

Respondida
Create Gui dynamically - resize Gui according to Label Position
Here's a programmatic GUI using a uitable that may work for you: data = array2table(["object 1" "abc123" "30" "45"; ...

8 días hace | 0

| aceptada

Respondida
Dynamic function call using eval
"compactly write and perform this kind of operations [without using eval]" function y = foo(x,N) [ism,idx] = ismember(N,[8,16,...

8 días hace | 1

Respondida
graphs dnt show anymore, eventhough the values are shown in the workspace.
There is no variable "speed_bump" in the workspace; perhaps you meant "speed_bumper".

8 días hace | 0

| aceptada

Respondida
ListBoxValueChanged callback doesn't get called when I change value.
Make sure that function is in fact the callback of the listbox: In App Designer, Design View, select the listbox In the Compon...

8 días hace | 0

Respondida
How to plot different subplots changing y variable name on each iteration
If you have a mat file containing sequentially-numbered variables, e.g., data1_1_1, data1_1_2, etc., then you can load the mat f...

8 días hace | 0

Respondida
Is it possible to produce a plot in MATLAB with the axes scaled based upon the natural logarithm?
x = linspace(0, 100); y = exp(x + 1); semilogy(x,y) yl = ylim(); n = ceil(log(yl(1))):10:floor(log(yl(2))); yticks(exp(n)...

8 días hace | 0

Respondida
Using hold for multiple tiledlayout figures in a for loop.
Specify which tiledlayout you want to use by passing it as the first input to nexttile. Example of plotting to two figures with...

8 días hace | 0

| aceptada

Respondida
How to generate a matrix from specific outputs from a MATLAB file?
Each grad is a 2x2 matrix; it's not clear from the question what size you want the final grad array to be, so here's one way to ...

8 días hace | 1

| aceptada

Respondida
how to get a value from a drop down menu in matlab
That line executes immediately after dd1 is created/set-up, so dd1value is whatever Value dd1 has initially. That is to say, tha...

9 días hace | 0

| aceptada

Respondida
Whats wrong with tester_app_3?
In order to fix the problems you're having, it is necessary to redesign the code significantly. I gather that your intent is to...

9 días hace | 0

Respondida
Generate surface from boundary points
x = linspace(0,3,6).'; y = linspace(0,1,6).'; nx = numel(x); ny = numel(y); zx = 0.134+0.007*rand(nx,2); zy = [zx(1,1) ...

9 días hace | 0

Cargar más