Answered
how to assign colour to a double plot by clicking on graph in UIAxes appdesinger Matlab (R2020a)?
Line color can be changed when the figure is in Edit-plot mode by right-clicking on the line which shows the lines context menu ...

10 days ago | 1

| accepted

Answered
x-axis error when adjusting axis label
What appears to be x-ticks in the compact boxplot are really text labels that are a member of an hggroup along with the boxplot ...

10 days ago | 0

| accepted

Answered
Capturing and Saving an image of a running using code in Matlab's Appdesigner
Staring in Matlab r2020b, the exportapp() function saves an image of your app or uifigure. See this Community Highlight for a...

11 days ago | 0

Answered
Analysing the user's input to see if it's a number or not
"inputs had to be integers/real numbers and that the start time had to be smaller than the stop time with the increment being ap...

11 days ago | 0

Answered
How to switch the position and values of X and Y axes?
"I need to switch the position and values of X and Y axes in plotting colormaps" Do you mean instead of imagesc(x,y,c) you want...

11 days ago | 0

| accepted

Answered
How to specify input arguments of a structure in a 'for' loop separate to field argument
This is why long lines of code should be broken up into separate lines. resultsMatrix = struct('TrialOrder', {}, 'TrialType', ...

11 days ago | 0

| accepted

Answered
How do I understand the following code?
The best way to understand it is by using the help or doc commands to look up each function name. At the top of each page you'l...

11 days ago | 0

Answered
How can I add a joining line between each iteration loop of scatter points
>How can I add a joining line between each iteration loop of scatter points Use plot3() instead of scatter3(). For example, ...

11 days ago | 1

Answered
convert Julian Date to yyyy-mm-dd
Are you looking for this? datetime(25856,'convertfrom','juliandate','Format','yyy-MM-dd') which makes sense given, datetime(...

11 days ago | 0

Answered
How to open a window after pushing a button
Check out the description for the ButtonPushedFcn in uibuttons. https://www.mathworks.com/help/matlab/ref/matlab.ui.control....

13 days ago | 0

Answered
If statement with multiple variables, or if the variables can be shortened.
if 0.6<=a && 0.6<=b && 0.6<=c && 0.6<=d && a<.10 && b<.10 && c<.10 && d<.10 dime = 1; end or if all(0.6 < [a,b,c,d]) && ...

13 days ago | 0

| accepted

Answered
Can we Assign "Z Axis" 'Label' and 'Range' to UIAxes in matlab appdesigner (R2020a)
The z axis is the 3rd dimension but your plot is 2D. You yyaxis to assign an independent label to the right y-axis. Then link ...

13 days ago | 1

| accepted

Answered
left side are not compatible with the size of the right side.
Your cramer function defines b as b=[]; The loop within that function tries to store the empty value of b in B(:,i) which is ...

13 days ago | 0

Answered
How do I plot multiple lines of best fit on a scatter plot?
See inline comments for changes. The most significant change is using refline() to plot the regression lines based on the fits....

13 days ago | 1

| accepted

Answered
Legend does not have the right color every two plots.
"Legend does not have the right color every two plots" That's because you're adding two lines on each iteration of your loop. ...

13 days ago | 1

| accepted

Answered
Problem with feedforwardnet function: not enough input arguments
Going all the way back to Matlab r2015b (the earliest version that provides access to documentation), feedforwardnet has always ...

13 days ago | 0

Answered
Making consecutive 1s and 0s as a seperate element
a = [1 0 0 0 1 1 1 1 0 1]; consecGroups = findgroups(cumsum([true, diff(a)~=0])); b = arrayfun(@(g){a(consecGroups==g)},1:max(...

13 days ago | 0

Answered
Line selection if the temperature difference does not change?
"sometimes when it is 0.01 it show 1 and sometimes 0" This is likely due to round-off error. For example, x = 0.01000001 x ...

13 days ago | 0

| accepted

Answered
How to link functionality of Plot "Linewidth" with Knobvalue in appdesigner Matlab (R2020a)
It looks like you're using a discrete knob which returns a character vector in its 'value' property. Here are some options. 1...

13 days ago | 0

| accepted

Answered
why i am getting the error "Index exceeds the number of array elements (1)" in my code? i am getting the error in line 33.
From you code, p = 0.07; p has 1 value, size (1,1). In the loop below, when j>1 you're getting the indexing error because p...

14 days ago | 0

Answered
How to add custom Yaxis option for UIAxes via Editfield(Numeric) while plotting in matlab appdesigner (Ver 2020a)
ymin = app.YAxisMinValueEditField.Value; ymax = app.YAxisMaxValueEditField.Value; % I'm guessing this handle ylim(app.UIAxe...

14 days ago | 0

| accepted

Answered
how to "convert" user inputted letter and number combination to a row,col position on a plot?
"The user is to input a number..." How is the user providing these inputs? If you're using the input() function, don't. It's ...

14 days ago | 1

Answered
How to plot 2 discrete plots (each of a different colour) with stem ?
h = stem(time,graphs) will return a vector of handles. Then set their color using h(1).Color = 'b'; h(2).Color = 'r'; If ...

15 days ago | 0

Answered
funtion to convert value to string
Alternative solution: use an anonymous function. str = getStars(p) returns a string for the given p-value. stars = {'**','*'...

15 days ago | 1

Answered
How to store value of for loop in a array
"some how it stops after 3 itrations at z = 0.03" That's actually not true. In your script, z contains 4 values and the loop h...

16 days ago | 1

| accepted

Answered
How to close mutiple uifigure using command
Just to add another approach, Set HandleVisibility to on when you create the UIFigures. That way their handles will be visibl...

17 days ago | 0

| accepted

Answered
How to check user input data using letters
The input() method of acquiring responses from a user is highly unconstrained and difficult to manage (see this example). What ...

17 days ago | 2

Answered
How do I use fill to create continuous error bars?
Having the imped_calc function matters because now we can see the size and shape of the outputs. freq is a 1x21 vector. Z_...

17 days ago | 1

| accepted

Answered
Plotting only the positive radius for a polar graph
"Is there a more efficient way to go about ths?" Yes❕ All of that in the loop can be done with this one line, r(r<0) = 0; ...

17 days ago | 2

| accepted

Answered
How can i convert the text to DNA sequence ?
Use regexprep to replace the matches in key(:,1) with the definitions in key(:,2). Since some DNA codes are special characters ...

17 days ago | 0

| accepted

Load more