Statistics
RANK
21
of 288,988
REPUTATION
12,330
CONTRIBUTIONS
0 Questions
3,954 Answers
ANSWER ACCEPTANCE
0.00%
VOTES RECEIVED
1,155
RANK
of 19,509
REPUTATION
N/A
AVERAGE RATING
0.00
CONTRIBUTIONS
0 Files
DOWNLOADS
0
ALL TIME DOWNLOADS
0
CONTRIBUTIONS
0 Posts
CONTRIBUTIONS
0 Public Channels
AVERAGE RATING
CONTRIBUTIONS
0 Highlights
AVERAGE NO. OF LIKES
Content Feed
vertical alignment of x-axis labels in bar charts
ax = gca(); ax.XAxis.TickLabelRotation = 45; % <- or whatever angle you want
18 hours ago | 1
| accepted
How to draw a line in a bar chart in complete x area
cats=categorical({'a','b','c'}) data = [37.6 24.5 14.6]'; errhigh = [2.1 4.4 0.4]; errlow = [4.4 2.4 2.3]; bar(cats,dat...
19 hours ago | 0
How do you make multiple for loops into one for loop?
No loops required: Rb = cosd(phi)*cosd(delta).*cosd(w)+(sind(phi)*sind(delta)); % row vector the same size as w I = Io....
1 day ago | 0
| accepted
how to separate number
function v = MySecret( y ) str = num2str(factor(y)); str(str == ' ') = []; % remove spaces v = unique(str-'0');
1 day ago | 0
| accepted
Changing uiaxes title color with button press
ax.Title.Color = [0 0 1]; % or whatever color you like
1 day ago | 0
| accepted
Array indices must be positive integers or logical values.
The variable u is not defined in your code, but if it exists in your workspace and is empty, then the line displacement = u(end...
1 day ago | 0
how to fix "Error using plot. Data must be a single input of y-values or one or more pairs of x- and y-values." error.
plot(uv_model,y(1:N-1),uv,y,uv_model2,y(1:N-1),'g','LineWidth',2)
1 day ago | 0
how to fix a "Error using plot Data must be a single input of y-values or one or more pairs of x- and y-values." problem
Try this: plot(uv_model,y(1:N-1),uv,y,'LineWidth',2)
1 day ago | 0
| accepted
how to specify filling properties in gscatter?
You can modify the required markers after calling gscatter. Here's an example: % random data for 6 groups N = 100; Ngroups = ...
1 day ago | 0
| accepted
Plotting a single contour to divide a region into two
Here's an example: % create vectors for x/y non/oscillatory n = 5; o_idx = [1 2 6 7 8 11 12 16 21 22]; [xo,yo] = meshgrid(1:...
1 day ago | 0
| accepted
Shows error in lung cancer detection using svm
Notice how the error message says "With appropriate code changes". Did you read and follow the documentation for fitcsvm, to ada...
2 days ago | 0
Square wave by vector multiplication
k = (1:n).'; a_k = repmat([1;0;-1;0],n/4,1)*4*A./(k*pi); square_wave = sum(a_k .* cos(k .* 2 * pi * f * t),1);
2 days ago | 0
| accepted
Excluding elements from array
WhennonLinear = find(PositionNonLin==1); Regression = fitlm(StrainA(1:WhennonLinear-1),StressA(1:WhennonLinear-1));
2 days ago | 0
| accepted
Plotting a graph of the distance between the centroid of an irregular shaped particle and its contour (radius) versus angle (equal intervals of theta from zero to 360 degrees)
%Image Threshholding clc; clearvars; clear all; img = imread('1_50.JPG'); %Read image BW = im2bw(img,0.45); %binarize ima...
3 days ago | 0
| accepted
x = 3x3 matrix, x_0 = 3x1 matrix. Need to calculate first 21 vectors in a series using x_n = x*x(n-1)
"some articles said MATLAB indexes at 1 and you can't start at n=0" That's right. Those articles were right about that. "when ...
3 days ago | 1
Post-formatting of figures
You can open the saved figure with the openfig function. f = openfig('figure1.fig'); You can modify any property of the figure...
3 days ago | 2
| accepted
How to unfade legend placed on an empty (invisible) plot?
Instead of making the lines in the last axes invisible, make them all-NaN so they don't show up but the legend stil appears norm...
3 days ago | 0
| accepted
Drawing on UI Axes in MATLAB app designer
Here's a simple demo app you can use to draw. After clicking the Draw button, left-click-and-drag on the axes to draw in black,...
3 days ago | 0
| accepted
Iterating over a cell array: do for loops work?
A few things: A for loop iterates over the columns of what you give it, so if you give it a column vector (cell array or otherw...
4 days ago | 0
Could I get any help with this infinite recursion?
I suspect that the for loop with fprintf is not intended to be part of the function definition. If you move it out (and change n...
4 days ago | 1
| accepted
looking for convoltion signal for output
t = linspace(0,10,50); x = zeros(size(t)); x(t > 0 & t < 5) = 1; h = zeros(size(t)); h(t > 0 & t < 7) = 1; y = conv(x...
4 days ago | 2
| accepted
how i can display confusionchart in app.UIAxes
According to the confusionchart documentation, you can specify the parent that the confusion chart will be created in, by specif...
4 days ago | 0
Figures not showing up with for loop
Be sure to reset ClArray (and CpArray, xArray and whatever else should not carry over from one iteration of the outer (i) loop t...
4 days ago | 0
Insert extra line in figure only in certain boxplots
A = rand(4,1); B = rand(4,1); f = figure; boxplot([A,B],Whisker=100,Labels={'Var A','Var B'},LabelOrientation="inline"); t...
4 days ago | 0
| accepted
Displaying animation in UI Axes in app developer
"the animation is just displayed on the app and not in the axes" I'm not sure what this means. I put your code into a script th...
4 days ago | 0
| accepted
gamma function with two parameters
Is this the function you mean to use? <https://www.mathworks.com/help/matlab/ref/gammainc.html>
4 days ago | 0
How can I keep track of a constantly updating text file's latest string
The following function returns a string containing the last non-empty line of text in the file (or "" if there are none). Call ...
5 days ago | 0
| accepted
for loop jump an element of an array
From the documentation for the colon operator: "x = j:i:k creates a regularly-spaced vector x using i as the increment between ...
5 days ago | 0
How to concatenate multiple Tables by comparing it to the variables associated with individual tables in workspace.
"This Would not work if any of the cases under the IF & elseif aren't satisfied then this table will not be Concatinated. " Tha...
5 days ago | 0
| accepted
How to create function with name-value pair arguments?
fcn('name','booey','professional_life','noine','personal_life',2,'tooth_size','XXXL') fcn('name','Fred','home_planet','Mars','t...
5 days ago | 0