답변 있음
How can I use ginput in app designer?
ginput is now supported in AppDesigner starting in r2020b We still don't have an option to specify the target figure handle in ...

거의 6년 전 | 8

| 수락됨

답변 있음
How we can plot Indian flag ploting
Download an image of the flag. use imread and imshow to read/plot the flag. Here's an example https://www.mathworks.com/...

거의 6년 전 | 0

답변 있음
How to unpack a table with a column of structs while preserving other columns?
Tnew is the input table (attached). gtTbl = cellfun(@struct2table, Tnew.groundtruth2DBB, 'Unif', false); T = [repelem(Tnew(:...

거의 6년 전 | 0

| 수락됨

답변 있음
naming file with count
sprintf('circle_cropped_%03d.jpg',count) % ^^

거의 6년 전 | 0

답변 있음
Show mouse position in another subplot
Here's a full demo that tracks mouse movement in axis #1 and replicates it in axis #2. The windowbuttondownfcn function updates ...

거의 6년 전 | 3

답변 있음
Legend error. What did I do wrong here?
The "width" figures contain multiple lines on top of each other just like in your last question. To demonstrate, open the wid...

거의 6년 전 | 0

| 수락됨

답변 있음
Legend error. How to fix?
Move this line to end, after copying the line objects. legend('\alpha=0','\alpha=1/9','\alpha=1/10','location', 'northeast') A...

거의 6년 전 | 0

| 수락됨

답변 있음
Icon for legend not showing in graphs
This annoying problem has popped up for me too, recently. If you're experiencing the same problem I have, you can fix it a fe...

거의 6년 전 | 1

답변 있음
Can I add 95% confidence ellipses around groups of data in a pca plot (biplot)?
If you know the center of the clusters and the CI's along the x and y axes for each cluster, you can use this function to plot t...

거의 6년 전 | 1

| 수락됨

답변 있음
Adding label to axis ticks
Set the XTickLabel propery of the axis. Use newline to break apart a string into multiple lines. Quick demo: ax = cla(); ax...

거의 6년 전 | 0

| 수락됨

답변 있음
Issue with cvpartition warning message
The warning message indicates that at least one of your group values is not represented within the test set. Stratified samplin...

거의 6년 전 | 0

Discussion


New in R2020b: Two new marker symbols
' The Matlab r2020b release introduces the new horizontal ('_') and vertical (' | ') line marker symbols that are centered ar...

거의 6년 전 | 13

답변 있음
legend in subplot
Update Since this thread continues to get 500+ views per month 9 years later, here's an updated solution for Matlab r2020b or l...

거의 6년 전 | 3

답변 있음
Multiple plots with same Legend
Update The graphics handles vector h in legend(h) can contain objects from any axes (created by axes(), subplot(), or tiledlayo...

거의 6년 전 | 1

답변 있음
global legend in tiledlayout
Global legends can be created by specifying the object handles that exist in any subplot (created by subplot or nexttile) within...

거의 6년 전 | 5

답변 있음
Adding a global legend to a tiledlayout
Update As of Matlab r2020b, legend location can be specified relative to axes created within an TiledLayout. This demo below p...

거의 6년 전 | 7

답변 있음
Adding legend for subplot when none of the subplots include all legend entries
All you need are the handles to each object you want to include in the legend and the handles can come from different subplots w...

거의 6년 전 | 4

| 수락됨

답변 있음
Can you plot polarplots so that theta zero location is at any arbitrary angle or are top left bottom right the only options?
Here's a demo showing how to rotate line objects and theta ticks on polar axes. The orientation of the polar axes is controlled...

거의 6년 전 | 3

| 수락됨

답변 있음
Plots every datapoint instead of a line
The problem occurs when yyaxis is used (remove yyaxis and example provided by OP behaves as expected). The full linespec is n...

거의 6년 전 | 1

답변 있음
Add legend to mutiple figures in a loop with conditional
I agree with Mario that you just have to provide the axis handle to specify where each legend goes. But there's some other stuf...

거의 6년 전 | 2

| 수락됨

답변 있음
Percentage values in scatterhist histogram
The histograms are normalized which means their bar heights are already a percentage. The percentage of each bar can be found ...

거의 6년 전 | 2

| 수락됨

답변 있음
what do '--' and '-.' mean?
These are line styles. Also check out the LineSpec input to the plot function. plot(X,Y,LineSpec)

거의 6년 전 | 0

| 수락됨

답변 있음
Maximum likelihood with Heteroskedasticity
You are suffering from the side effects of using global variables (incorrectly). Don't use global variables in Matlab. Ins...

거의 6년 전 | 0

| 수락됨

답변 있음
Changing transparency of individual bars in bar
You can plot the bars one at a time or in groups that all have the same FaceAlpha level. That way the bars with differen alpha...

거의 6년 전 | 1

| 수락됨

답변 있음
Removing rows duplicates based on some conditions
Method 1 Here's a simple solution that assumes matching rows in columns 1:3 are next to each other. The assert command tests t...

거의 6년 전 | 0

| 수락됨

답변 있음
Fit a line to data using regress
b = regress(y,x) If x and y are vectors, they must be column vectors regress(y(:),x(:)) For alternatives, see https://www....

거의 6년 전 | 0

답변 있음
a small problem with linspace
11981420 is not divisible by 40. 11981420/40 ans = 2.9954e+05 % = 299535.5 size(s) ans = 1 299535 29...

거의 6년 전 | 0

| 수락됨

답변 있음
How do I change the colour of certain indices in scatterplot?
Here's are 4 demo that all achieve the same result. Xvals = [1,2,3,4,5,6,7,8,9]; Yvals = [2,5,5,5,2,2,5,5,5]; % Show scatt...

거의 6년 전 | 0

| 수락됨

답변 있음
How to find what number is missing from a range inside of an array?
Check out Lia = ismember(A,B) Example full = [1;2;3;4;5]; sample = [2;4;5]; idx = ismember(full, sample); full(~idx)

거의 6년 전 | 0

| 수락됨

답변 있음
Disable app while calculating
How to disable app components while app is busy List all components you'd like to disable/enable in a vector of handles. Impor...

거의 6년 전 | 4

더 보기