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
3D - XRD plot
Let's see function plot3 can satisfy your requirement or not. figure; ax = gca; hold(ax,'on'); plot3(ax,SampleA(:,1),repelem...

etwa eine Stunde ago | 0

Answered
How to reorder the List box items in created dialogue window?
Attached code for a listbox with move up button callback. If this is what you need, you may also implement the move down button...

etwa 2 Stunden ago | 0

Answered
Displaying message in GUI
Use function <https://www.mathworks.com/help/matlab/ref/uiprogressdlg.html uiprogressdlg> or <https://www.mathworks.com/help/mat...

etwa 22 Stunden ago | 0

Answered
Fit a spline function to a set of data points
Use function <https://www.mathworks.com/help/matlab/ref/spline.html spline>

2 Tage ago | 0

Answered
How to table the data
Use function array2table A=[1 2 3 4 5 6 8 9 7 1 4 5 1 0 1]; T=...

3 Tage ago | 0

| accepted

Answered
How to color an image
Try the following: I = imread('https://www.mathworks.com/matlabcentral/answers/uploaded_files/1052130/image.png'); BW = imbina...

4 Tage ago | 0

Answered
Error adding DataTipRows to patch/fill
Try the following: figure; %Produce figure LATLONG.F1 = [0 1 1 0; 1 0 0 1]; %2x4 array ...

5 Tage ago | 0

| accepted

Answered
How to implement Multi-Otsu Thresholding in matlab?
Use function <https://www.mathworks.com/help/images/ref/multithresh.html multithresh>

11 Tage ago | 1

Answered
Adding additional information on plot tooltip
Use function <https://www.mathworks.com/help/matlab/ref/matlab.graphics.datatip.datatiptextrow.html dataTipTextRow>

14 Tage ago | 0

Answered
How do I convert numbers of the form "12,109,987" stored in strings
use function <https://www.mathworks.com/help/matlab/ref/str2double.html str2double> instead of str2num

16 Tage ago | 0

Answered
How to create multiple answers accepted questions in Matlab script?
Use function listdlg with multiple SelectionMode.

18 Tage ago | 0

| accepted

Answered
Unrecognized function or variable 'm_equations'
Move the line function MorrisLecar to be the first line of your entire code.

19 Tage ago | 0

Answered
Concatenate three-dimensional matrices
This is the third dimension, hence cat(3,A,B)

19 Tage ago | 0

| accepted

Answered
How to add Slider properties with in the app designer?
It uses Limits rather than Min, Max to define the limits. Check this: <https://www.mathworks.com/help/matlab/ref/matlab.ui.c...

20 Tage ago | 0

Answered
How can I interpolate 13 hour data with each 10 minutes, in every second?
Put the data in timetable and use function retime.

21 Tage ago | 0

| accepted

Answered
How to Display selected image on the same window (App Designer)
Attach a very simple example to import a jpg file for your reference. Note that you may need to modify it according to your nee...

23 Tage ago | 0

Answered
How to fix Index position 1 exceeds array bounds (must not exceed 227)
After image resize, the size of the image is always 227x227 in terms of number of rows and columns. However, the original image...

25 Tage ago | 0

Answered
Merging Cell Array Elements with cellstr
Try this: merged = cellfun(@(x) cat(2,x{:}),num2cell(cell_temp,2),'UniformOutput',false)

26 Tage ago | 0

Answered
Modify cell value of a row based on other cell value in same row uitable
Just move the last comment as an answer. function uitable4_CellEditCallback(hObject, eventdata, handles) % Get the row num...

27 Tage ago | 0

| accepted

Answered
Find the length of a vector up to a certain value
The inner for loop is not necessary and it overwrite itself for every 'n'. You may modify the code as follows. ProbdistPoreden...

27 Tage ago | 0

Answered
How can I let my object repeat over time when animating it?
Try to preallocate 'AV' before the for loop and change the data each time inside the for loop: AV = patch('Faces',1,'Vertices',...

28 Tage ago | 0

Answered
"regionprops" detecting one line only
load('s.mat') L1 = bwlabel(s); %vislabels(L1); % Ignore the user created funct...

29 Tage ago | 0

| accepted

Answered
How to draw two plots in one figure?
Use function <https://www.mathworks.com/help/matlab/ref/yyaxis.html yyaxis>

etwa ein Monat ago | 0

| accepted

Answered
How to add text to a line in the plot?
If they are horizontal lines, you can use function <https://www.mathworks.com/help/matlab/ref/yline.html yline> By using this...

2 Monate ago | 0

| accepted

Answered
How to get the MathWorks documentation in chinese?
Select the Chinese website with Simplified Chinese at the bottom of the website. Then you can find the translated documentation...

2 Monate ago | 0

Answered
Error when selecting variables from an Excel sheet
Better to define the Variable Names already in the spreadsheet as follows: opts = spreadsheetImportOptions("VariableNamesRange"...

2 Monate ago | 0

| accepted

Answered
how to save plot with its background color without the gray color
b_col = [255, 150, 0]; % orange color code b_col = b_col./255; f = figure; f.Color = [1 1 1]; % Set the...

3 Monate ago | 0

| accepted

Answered
Argument of max values of multiple 2D arrays
A1 = [1000 25;3 258]; A2 = [1 30;247 259]; C = 10*(A1>A2) + 20*(A2>A1)

3 Monate ago | 0

Answered
How to change axes in tiledlayout with different x and y axes
In order to set the limits, use the following ax1.XLim = [XAxislow XAxishigh]; ax1.YLim = [0 400]; instead of ax1.XLimit...

3 Monate ago | 0

| accepted

Load more