Community Profile

photo

Simon Chan


Hospital Authority

Active since 2021

Statistics

  • 12 Month Streak
  • Pro
  • Knowledgeable Level 5
  • First Answer

View badges

Content Feed

View by

Answered
Add heatmap into uifigure (No App Manager)
You may use uipanel instead of uiaxes for heatmap

ungefär 14 timmar ago | 0

Answered
detect the largest red object, its centroid and put bounding box around it
use function <https://www.mathworks.com/help/images/ref/bwareafilt.html bwateafilt>

ungefär 23 timmar ago | 0

Answered
Meshgrid lighning and how to use contour around the plot
For the accurate solution, you need to find those x and y where z=0.2 and 0.8. If an estimated solution is accepted, the positi...

en dag ago | 1

Answered
Surf plot on GUI interface
Create an uiaxes inside the uipanel or you can simply use uiaxes instead of uipanel inside the uifigure.

en dag ago | 0

Answered
find and store the index value of maximum or minimum value of cell array
[~,idxMax]=cellfun(@max,yourCell); % Index for maximum [~,idxMin]=cellfun(@min,yourCell); % Index for minimum

3 dagar ago | 0

Answered
How to create ROI object handle?
You may try the following: h = figure; imshow(imread('pout.tif')); imrect(); % not use the output of imrect() ax=gca; hAx=f...

3 dagar ago | 0

Answered
Having issues with fprintf statement. It gives me "error using vertcat"
Missing dots in the second line, try the following fprintf(['j \t k =1 \t k=2 \t k=3 \t k=4 \n'... '- ----...

4 dagar ago | 0

| accepted

Answered
How to align both vertically and horizontally annotation box with legend box in plots?
"annotation" dose not have properties of legend command as north, east,... I think you may need to calculate the margin separat...

4 dagar ago | 0

| accepted

Answered
How to skip zeros values form a matrix and plot with a time values?
You may put those zero to NaN and plot it. It will skip those points. A = [1,2,3,4,0,6,7,0,9,10,11,0,13,14,15]; t=[1,2,3,4,5,6...

10 dagar ago | 1

Answered
Plotting a legend without displaying data on UIAxes
Try this if you would like to show the figure and legend without showing the data. Set the 'LineStyle' to 'none' to hide the li...

10 dagar ago | 0

Answered
how do i use datetime adjust xtick
Try the following without using the function datetick. f = figure; ax=gca; plot(ax,all_time_1206 , all_tide_outliner_1206,'k'...

10 dagar ago | 0

Answered
i want to see each plot figure for every j i have, so how can i do it?
Your for loop states j = length(dt1), which is 3 in your case. So the for loop only do figure 3 for you. Use the following inst...

18 dagar ago | 0

| accepted

Answered
How to shade the same area in each subplot in a 5x1 Figure?
If you would like to shade the entire region and already knowing the y-limits, you can put the value of those limits directly wh...

18 dagar ago | 0

Answered
detecting circle using hough tranform
The range of radius is too small and the sensitivity may not be good enough. I choose radius from 100 to 150 pixels and sensiti...

18 dagar ago | 1

Answered
Error using convert2quaterly: The value of 'TT1' is invalid.
Your data has only one column besides the date. So you can only state one method to your data. The following shows an example w...

18 dagar ago | 0

Answered
JPG to GIF animation
The colormap for the first two figures are overwritten by the third one in the following: [A,map] = rgb2ind(imread('obr_0.jpg')...

23 dagar ago | 0

| accepted

Answered
delete consecutive commas in txt file
May be this: rawdata = readlines('https://www.mathworks.com/matlabcentral/answers/uploaded_files/1122645/ca.txt'); iwant = [];...

23 dagar ago | 1

Answered
Save a Figure as a .png and .pdf of a Specific Size
Try this to see whether the following is what you want. clear; clc; f = figure; plot(1:10,1:10); % Set figure position after...

25 dagar ago | 0

Answered
Import data csv with date/time and other info with setvaropts
Try this: opts = detectImportOptions('https://www.mathworks.com/matlabcentral/answers/uploaded_files/1121365/essai_data_3.csv',...

26 dagar ago | 1

| accepted

Answered
Start and end date picker to load data to graph
If your weather data are arranged in timetable format, another option you may use is function timerange. Suppose the variable n...

ungefär en månad ago | 0

Answered
Plotting graph with three variables
Try to use function <https://www.mathworks.com/help/matlab/ref/plot3.html plot3> or <https://www.mathworks.com/help/matlab/ref/s...

ungefär en månad ago | 0

Answered
Min and Max values and corresponding x/y values
use two output arguments from function <https://www.mathworks.com/help/matlab/ref/max.html#mw_f4dadb60-ee1a-4996-a37b-2fdd20904f...

ungefär en månad ago | 0

Answered
Average column data with specific values
Use function writetable to convert your data on a table array. Then use function groupsummary as follows G = groupsummary(T,"...

ungefär en månad ago | 1

Answered
Integer operands are required for colon operator when used as index.
When you plot the solution, you use the following index: 1:(nt/10):nt However, variable "nt" is equals to 1001 and the result ...

ungefär en månad ago | 0

| accepted

Answered
How to delete symmetry cells in Matlab?
Try this: F = cell(1,3); F{1} = cell(1,10); F{2} = cell(1,16); F{3} = cell(1,16); F F{2}(9:16)=[]

ungefär 2 månader ago | 1

Answered
Vector as ItemsData property in List Box
Suppose the listbox is defined as follows and ItemsData are given in your example. app.ListBox = uilistbox(app.UIFigure); You ...

ungefär 2 månader ago | 0

Answered
How to draw rectangle with coordinate, height and width provided?
Another option is to determine the coordinates of the lower left corner of the rectangle before you draw it. It can be determine...

ungefär 2 månader ago | 0

Answered
Function in App-Designer struggles to read dropdown values
Use function str2double as follows: % Value changed function: minFrequenzDropDown function minFrequencyDropDownValueC...

ungefär 2 månader ago | 0

| accepted

Answered
Remove row if its value is not different enough from the value in the row above it.
Let A be your matrix, try the following: threshold = 100; A([false;(diff(A(:,1))<=threshold)],:)=[];

ungefär 2 månader ago | 0

Answered
How to plot mutiple vertical lines over x axis ?
User function xline is easier.

3 månader ago | 0

Load more