回答済み
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...

3日 前 | 0

回答済み
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...

3日 前 | 0

| 採用済み

回答済み
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...

3日 前 | 0

| 採用済み

回答済み
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:...

3日 前 | 0

回答済み
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日 前 | 1

| 採用済み

回答済み
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日 前 | 1

| 採用済み

回答済み
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...

4日 前 | 1

| 採用済み

回答済み
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日 前 | 3

回答済み
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 ...

5日 前 | 0

| 採用済み

回答済み
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 +...

5日 前 | 0

| 採用済み

回答済み
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...

5日 前 | 0

| 採用済み

回答済み
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...

6日 前 | 0

| 採用済み

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

6日 前 | 1

| 採用済み

回答済み
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...

6日 前 | 1

| 採用済み

回答済み
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...

7日 前 | 0

| 採用済み

回答済み
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...

7日 前 | 2

| 採用済み

回答済み
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"; ...

7日 前 | 0

| 採用済み

回答済み
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,...

7日 前 | 1

回答済み
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".

7日 前 | 0

| 採用済み

回答済み
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...

7日 前 | 0

回答済み
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...

7日 前 | 0

回答済み
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)...

7日 前 | 0

回答済み
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...

7日 前 | 0

| 採用済み

回答済み
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 ...

7日 前 | 1

| 採用済み

回答済み
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...

8日 前 | 0

| 採用済み

回答済み
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...

8日 前 | 0

回答済み
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) ...

8日 前 | 0

回答済み
How to combine two plots in same figure with axis break?
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is a program for 1-D Photonic crystal...

8日 前 | 0

| 採用済み

回答済み
How to align textbox in matlab plot?
"Is it possible that I can put all the six textbox in the same position of the respecitve graph?" Yes. Here's an example that p...

9日 前 | 0

回答済み
Help with code running for each value of a vector
"how to get a function to run through all values of a vector" Use a for loop with Nsnr iterations, where Nsnr is the number of ...

9日 前 | 0

| 採用済み

さらに読み込む