Community Profile

photo

Simon Chan


Hospital Authority

Active since 2021

Statistics

  • Pro
  • 6 Month Streak
  • Knowledgeable Level 4
  • First Answer

View badges

Content Feed

View by

Answered
how to convert dicom RT structure to binary mask
It uses world coordinates in x,y & z axis which is shown in your attached png file. So you need to capture the axis information ...

alrededor de 16 horas ago | 0

Answered
How to plot unequal time series with same x-axis
You may try the following: T = readtable('data.csv'); % Read csv file as entire table TT2 = table2timetable(T(:,4:5))...

1 día ago | 0

| accepted

Answered
How to iterate matrix multiple times?
Write your code as a function and save it as a m-file (or use the attached file): function Lj = processLa(La) H = [1 1 1 ...

1 día ago | 1

Answered
Can anyone help me?
Varaible a becomes a character array after you use function num2str, so it is comparing a 'character' instead of a number. On t...

2 días ago | 1

Answered
How to I find the intersection point between y=x*exp(x)/(exp(x)-1) and y=3? I can't seem to have the intersection point displayed.
Use function fzero to help you to find the intersection. x = 1:1:10; f = @(x) x.*exp(x); g = @(x) exp(x)-1; y_1 = @(x) f(x)....

3 días ago | 0

Answered
How to check in one loop for multiple values V1,V2,V3... I have write the code but I am not getting value multiplied in answer
One possible way is to use a cell array instead of different variables as following: Use only one variable V. V(1) = {char(937...

3 días ago | 0

| accepted

Answered
Creating an Image from a Textfile Data using Matlab
Try the followings: (with editing below) Normalization just divide by 255 for uint8 image. [Ny,Nx,Nc] = size(input_image_3D); ...

3 días ago | 0

| accepted

Answered
Superimposing Graphs with large difference in Y-axis values
Try function <https://www.mathworks.com/help/matlab/ref/yyaxis.html yyaxis>

3 días ago | 1

Answered
How to create a custom grayscale colormap between white and black?
You may use 'colormapeditor' as follows to create a custom colormap:

5 días ago | 0

| accepted

Answered
plot in logarithmic scale
I think you may need to use function contour3. Then you can set the Z-axis scale to log by set(gca,'ZScale','log')

5 días ago | 0

Answered
changing dicom-dict.txt has no effect
You may refer to the following and try to create a new DICOM tag and write it to a new DICOM image. After that, the DICOM heade...

6 días ago | 0

Answered
What would be the MatLab code to get the output from the input image?.
Try the following: rawdata = num2cell((randi(10,10,4))); index = [2 2 2 1 2 3 4 2 1 2]'; singlecell = cellfun(@(x,y) x(y), nu...

7 días ago | 0

Answered
How can I save the result obtained from the For loop in one variable ?
You may assign another variable with index which stores the result within the loop for i = 1:10 %.... %.... [centers, r...

7 días ago | 1

| accepted

Answered
How to convert cell to matrix
Try this, where A is your 100001x2 cell: cell2mat(cellfun(@(x) x,A))

7 días ago | 0

Answered
How can I skip data while reading values from text file?
I try to use function fgetl as follows: Noticed that the first 2 rows have data format different from others, so they are remov...

7 días ago | 0

| accepted

Answered
Error Using cellfun for a Matrix
Try the following: for r = 1:27 for c = 1:27 A = a_d{r,c}; B_x{r,c} = cellfun(@(x) sum((x-A)./(x+A),'all...

8 días ago | 2

| accepted

Answered
How to make circle in matrix form
Another option using function pol2cart: clear; clc; separation = 1; % Angle separation, 1 degree ...

8 días ago | 0

Answered
I need to contour a round object in a image.
One possible way: rawdata = imread('Moon.jpeg'); BW1 = imbinarize(rawdata); BW2 = bwareafilt(BW1,1); BW3 = imfill(BW2,'holes...

8 días ago | 1

| accepted

Answered
How to set minorticks in colorbar?
Try the following: ax = axes('position',cb.Position); set(ax,'XMinorTick','on');

11 días ago | 0

Answered
How to list group names on resampled points after splitapply?
Try this: [G,name] = findgroups(holes12and13.holeid); % Store the extracted hold id % ...

11 días ago | 0

| accepted

Answered
text.png how to remove vertical lettering on a photo?
regionfill supports grayscale image and your input image is a black and white image only. Therefore, regionfill gives an error....

11 días ago | 0

| accepted

Answered
Daily mean of a hourly dataset
Try the following: filename = 'data_2001_2010.txt'; Data1 = readtable(filename,'VariableNamingRule','preserve'); Data1(:,1)=[...

11 días ago | 0

| accepted

Answered
Split table entry into separate columns
How about the following: Name = "ABBV 09/17/2021 120.00 C"; Data = "Dummy"; A = table(Name,Data); A.Name = strsplit(A.Name,...

12 días ago | 0

Answered
Overlay ROI on an image
The four-element position vector is located at roi.Position, which is [600,200,250,450], Try the following: pos=roi.Position; ...

15 días ago | 0

| accepted

Answered
determining the edges of the money image with red color
It is better to ask imfindcircles to find all the dark circles and adjust the range of radius. In your case, the range is too s...

16 días ago | 0

| accepted

Answered
How to adjust the intensity of grayscale image?
Use function imcontrast

16 días ago | 0

Answered
Plot line type not displaying as desired .
Try the following to sort the x-axis in correct order: figure(1) clf [sort_Id_A,idx] = sort(Id_A); sort_kf_max_SW_A = kf_max...

16 días ago | 1

| accepted

Answered
The angle and radius above the complex plane.
Something like this? rho = [1.5 1.3 1.0]; theta = [10 20 30]; Z = rho.*exp(deg2rad(theta).*1i); polarplot(Z,'*')

21 días ago | 0

| accepted

Answered
recieving error while using atand command
The value of variable 'aoa' is outside the interpolation range 'Aoa' and hence it gives NaN as the result. So the root cause is...

22 días ago | 0

| accepted

Answered
dropdown list cancel option
Try function isempty: if isempty(result) disp('User select to cancel'); end

22 días ago | 0

Load more