Community Profile

photo

Simon Chan


Hospital Authority

Con actividad desde 2021

Estadísticas

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

Ver insignias

Content Feed

Ver por

Respondida
resize Excel data matrix
Try this to see whether it is what you want. rawdata = readmatrix('https://www.mathworks.com/matlabcentral/answers/uploaded_fil...

1 día hace | 0

| aceptada

Respondida
How to thicken a line separately for the parallelplot of matlab?
Separate the data into two groups as follows: Age = randi(50,[100,1]); % Random data Height = randi(180,[10...

1 día hace | 1

| aceptada

Respondida
How can I get DataCursor information from scatter plot using a callback function in app designer
The coordinates is stored in the property called IntersectionPoint belongs to the events in the ButtonDownFcn callback as shown ...

2 días hace | 0

Respondida
Transparent patches in the main figure, but no transparent patches in the legend
One possible way is to use dummy handles. N = 100; x = linspace(0,1,N); y1 = repmat([-2;2],1,N); y2 = repmat([-1;1],1,N); f...

3 días hace | 1

| aceptada

Respondida
how to convert .mat file to .dcm file?
Try the following: rawdata = load('petnew.mat'); J = permute(rawdata.petnew, [1 2 4 3]); dicomwrite(J,'yourFile.dcm');

4 días hace | 0

| aceptada

Respondida
I can't draw the vector field
The spacing used in function gradient is 0.2, but the spacing in your data is 0.3 and hence it give you an error. Try using same...

4 días hace | 0

Respondida
y-axis with diffent scalings
Let's try use function yyaxis. Separate the data into two groups and plot the larger and smaller values using left and right y-...

4 días hace | 0

Respondida
How to interpolate in 2d with the 3rd variable as a vector?
If you are using R2023a, you may use function fillmissing2. dt = [3.96 4.36 0.6 2.6 1.44 3.84 3.64 0.72]; x = [80 120 40 60 10...

6 días hace | 1

| aceptada

Respondida
creating a warning dialog that wait until the user press ok, if the user press x the execution stops
One possible way is to use function uniconfirm. fig = uifigure; selection = uiconfirm(fig,'Overwrite existing excel file','Fil...

25 días hace | 1

| aceptada

Respondida
Convert Pixel value to HU on MicroCT without the Rescale Slope and Rescale Intercept Attribute
The variable 'slice500' in your code is a matrix only, and hence you can display it as an image by using function imshow() or im...

27 días hace | 1

Respondida
How to save volshow(data,config) as fig or img [volumeViewer]?
In case a new window is open after using function volshow, you should be able to find the figure object and save the image using...

28 días hace | 2

| aceptada

Respondida
Viewer3d fullscreen position command not working?
Sorry that I was only guessed last night and recently tested on my laptop. The viewer3d object is act as a Children on a figure...

29 días hace | 0

| aceptada

Respondida
How do I find the circularity of the bubbles in the sample IR image?
Check this: Revised Circularity Measurement in regionprops (R2023a) if you are using R2023a. Or check the answer from Steve Edd...

alrededor de 1 mes hace | 0

Respondida
Plotting the exact and numerical solutions on the same plot
Just add hold on f = @(t, x) (x-t^2+1); [t, x] = RK4Method(f, 0.5, 0, 2, 200); plot(t, x); xlabel('time'); ylabel('x'); ho...

alrededor de 1 mes hace | 0

| aceptada

Respondida
App designer: UIAxis ButtonDownFcn with key modifier?
You may combine several callbacks to achieve your goal. The attached example uses WIndowKeyPressFcn and WindowReleaseFcn from a...

alrededor de 1 mes hace | 0

Respondida
Resize font size automatically when app window size is enlarged
You may try to use SizeChangedFcn callback to adjust the font size as a workaround. The following example determine the new fon...

alrededor de 1 mes hace | 0

Pregunta


ocr not recognizing some numbers
Trying to use function ocr to extract some numbers from the attached image. Expected to have 9 numbers and the results have 8 n...

alrededor de 1 mes hace | 3 respuestas | 0

3

respuestas

Respondida
setting limit for colormap
You may try to create a custom colormap using colormapeditor.

alrededor de 1 mes hace | 0

Respondida
Image Distortion after convert axial CT to sagittal view
The images are not isotropic and hence it is distorted. Use function imresize after you reconstruct the image from axial to sag...

alrededor de 1 mes hace | 1

Respondida
How to create a plot with customized axis location?
You may move the axis to the origin by setting 'XAxisLocation', or 'YAxisLocation' property to 'origin'. Otherwise, you have to...

2 meses hace | 0

Respondida
How to reproduce identical tab whenever button is clicked?
Set the Callback of Button pushed function as follows: % Button pushed function: Button function duplicateTab(app, event) ...

2 meses hace | 0

| aceptada

Respondida
Measure time until type a certain key
Attached is a small program that you may try to see whether it is suitable for your purpose of not. It will open an empty figur...

2 meses hace | 0

Respondida
Quiver arrow doesn't show at the right place
By default, AutoScale is set to on and AutoScaleFactor is 0.9. So you may set AutoScale to off or set AutoScaleFactor to 1.

3 meses hace | 0

| aceptada

Respondida
How to change the imagesc axis?
Use function xticklabels clear all; close all; t= 0:0.1:1; N = length(t); M = randn(N,N); figure() imagesc(M); ax=gca; x...

3 meses hace | 0

Respondida
Change pixels to mm in axes
Read about function <https://www.mathworks.com/help/images/ref/imref2d.html imref2d>

3 meses hace | 0

Respondida
Using rmoutliers without a for loop
You may consider using function <https://www.mathworks.com/help/matlab/ref/filloutliers.html filloutliers> and fillmethod to rep...

3 meses hace | 0

| aceptada

Respondida
str2num change from 2018 to 2021
Not sure any change on function str2num, but I would use function str2double to try.

3 meses hace | 0

Respondida
How to apply the same style/color and axes labels to all subplots?
Another approach for your consideration. Noticed that the following example is only applicable provided all subplots have the s...

3 meses hace | 1

Respondida
listbox cannot make it select single or none, it has to be single or multiple.
To my understanding, multiple select does not allow select none, it has automatically select the first one unless you assign som...

3 meses hace | 0

| aceptada

Respondida
In-Figure Toolbar overlaps with the 1st legend line
Add dummy data to make empty rows in legend for your consideration. If the dummy data mess up with your original data, then thi...

3 meses hace | 0

Cargar más