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

más de 2 años 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...

más de 2 años 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...

más de 2 años 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...

más de 2 años 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 ...

más de 2 años 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 +...

más de 2 años 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...

más de 2 años 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...

más de 2 años hace | 0

| aceptada

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

más de 2 años 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...

más de 2 años 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...

más de 2 años 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...

más de 2 años 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"; ...

más de 2 años 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,...

más de 2 años 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".

más de 2 años 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...

más de 2 años 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...

más de 2 años 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)...

más de 2 años 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...

más de 2 años 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 ...

más de 2 años 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...

más de 2 años 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...

más de 2 años hace | 1

| aceptada

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

más de 2 años hace | 0

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

más de 2 años hace | 0

| aceptada

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

más de 2 años hace | 0

| aceptada

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

más de 2 años hace | 0

| aceptada

Respondida
how does this work some clarification
This is the part of the solution that's relevant to solving the problem: tf = ~isempty(regexp(n_str(end),'[02468]')); The way ...

más de 2 años hace | 1

| aceptada

Respondida
adding individual points using scatter in a grouped bar graphs
S1 = [41 55]; S2 = [34 26]; P1 = [64 55 38 41 45 47]; P2 = [90 34 51 54 65 52]; mpi1 = [mean(S1) mean(P1)]; mpi2 = [mean(...

más de 2 años hace | 0

| aceptada

Respondida
Why did I this error Error in Matlab_Partical_fig1 (line 43).
function pushbutton2_Callback(hObject, eventdata, handles) Ft = B ; B is not defined in that function. B is defined in the ma...

más de 2 años hace | 0

Respondida
How Do I dowload a file from Amazon S3?
Once you have your environment set up, you should be able to treat files on S3 as you would treat any local file, e.g., rawdat...

más de 2 años hace | 0

Cargar más