답변 있음
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 ...

거의 6년 전 | 0

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

거의 6년 전 | 1

답변 있음
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...

거의 6년 전 | 1

| 수락됨

답변 있음
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...

거의 6년 전 | 4

답변 있음
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 ...

거의 6년 전 | 2

답변 있음
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_...

거의 6년 전 | 1

| 수락됨

답변 있음
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; ...

거의 6년 전 | 2

| 수락됨

답변 있음
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 ...

거의 6년 전 | 0

| 수락됨

답변 있음
Handle of UI component from which a context menu has been opened
Neither the cxMenuSelectionFcn nor the ContextMenuOpeningFcn functions indicate the object that evoked the context menu. Chec...

거의 6년 전 | 1

| 수락됨

답변 있음
Custom Datatip with Line Information on Matrix Plot
Loop through the object handles and add the DataTipRows for each object. t = 0:.001:1; f = [10,20,30]; % information ...

거의 6년 전 | 1

| 수락됨

답변 있음
3D Scatter with different Z axis vector length
I don't know how you're storing the variables but the demo below should get you started. It loops through values of R and you...

거의 6년 전 | 0

| 수락됨

답변 있음
Plotting different colored line based on condition(s)
A line object can only have 1 color. To change the color of values above and below y=0 you have to break up your line into segm...

거의 6년 전 | 0

Discussion


New in R2020b: new way to return height or width of arrays
<</matlabcentral/discussions/uploaded_files/2166/2020b_heightwidth_img.png>> Prior to r2020b the height (number of rows) and ...

거의 6년 전 | 6

답변 있음
Setting the figure size independent of the legend size
It sounds like you want to expand the axis size which would also require adjusting the figure size. Here's a demo. fig = fi...

거의 6년 전 | 1

| 수락됨

답변 있음
Diagonal displacement of matrix into another matrix
Fast & efficient vectorized method m is the input matrix size 2xN where N is divisible by 2. A is the output array containing...

거의 6년 전 | 1

답변 있음
stacked 3d vertical bar
Combining the 'stacked' and 'detached' styles in a 3D bar plot is thoroughly explained here https://www.mathworks.com/matlabcen...

거의 6년 전 | 0

답변 있음
Stacked vertical 3d plot sorting
bar3(__) styles and limitations Matlab's bar3(data) produces a n*m grid of 3D bars for n rows and m columns of the input matrix...

거의 6년 전 | 0

| 수락됨

답변 있음
how can I store a set of segmented output images saved as individual mat files into a cell array
Set up your file names in an array such as filenames = {'201080.mat', '201081.mat', '201082.mat', '201083.mat'}; % full path i...

거의 6년 전 | 0

답변 있음
Control chart function help
The second input to controlchart(x,group) is a grouping variable that defines which group each element of x belongs to. It must...

거의 6년 전 | 0

답변 있음
Find z value out of x and y values from a countour in command window
A surf plot is not a contour plot. That was a little confusing. Thanks for clearing that up. Use the handle to your surface...

거의 6년 전 | 0

답변 있음
Rescale multiple spheres on the same 3d plot
On the first iteration of the i-loop, n equals 6.9637.... This value is passed to sphere(n) and, as the error message indicates,...

거의 6년 전 | 0

| 수락됨

답변 있음
How to overlap plots from different scripts?
Look up the documentation for copyobj. Not only is a new figure generated with the code you shared but a very important error...

거의 6년 전 | 0

| 수락됨

답변 있음
Different results using mesh and surf
> The problem is the two graphs are different. The surf function seems to have gotten it correct, but the mesh function looks li...

거의 6년 전 | 0

| 수락됨

답변 있음
How do I repeat a number based on a criteria?
Try out F = fillmissing(A,method) where method is set to "previous". To apply that to your table, it will look something like,...

거의 6년 전 | 0

답변 있음
A function to set common properties for all open figures
h = findall(0, '-property', 'TickLabelInterpreter'); set(h, 'TickLabelInterpreter', 'Latex')

거의 6년 전 | 0

| 수락됨

답변 있음
How can I add a drop-down menu for a certain column in a UItable in App Designer?
Refer to Matlabs documentation on the uitable's ColumnFormat property which demonstrates how to set up pop-up menus within a col...

거의 6년 전 | 0

| 수락됨

답변 있음
How to create a Lambertian (diffuse) sphere
There are probably official definitions and methods for a Lambertian diffuse sphere but here's something that looks like it. ...

거의 6년 전 | 1

| 수락됨

답변 있음
how can I fix Warning: Imaginary parts of complex X and/or Y arguments ignored.
Your data contain complex numbers. If this is unexpected, it indicates that there's a problem somewhere along your pipeline a...

거의 6년 전 | 0

답변 있음
Code for Counting and Lookup
Here's a demo. v is the input vector of 1s and 0s (or Trues and Falses) r is the output vector of row numbers in v that star...

거의 6년 전 | 1

| 수락됨

답변 있음
How to display plot and rectangle at the same time?
" I have tried 'hold on' , but that didn't work" My guess is that hold on was applied to the wrong axes. This can happen when ...

거의 6년 전 | 0

| 수락됨

더 보기