Community Profile

photo

Henric Rydén


Karolinska University Hospital

Active since 2013

Statistics

All
  • Knowledgeable Level 3
  • First Submission
  • Thankful Level 1
  • Knowledgeable Level 2
  • First Answer

View badges

Content Feed

View by

Answered
how can I get that the thikness of one slice of a CT image is measured at the milimeter level?
Read tags only, not the image: info = dicominfo('filename.dcm'); Get slice thickness in mm: info.SliceThickness

9 years ago | 0

Answered
Events in edit component
The standard "Callback". It has no other name. To set it, right-click in *GUIDE - View Callbacks - Callback*

9 years ago | 0

| accepted

Answered
Make directories for every subject
subjects = [1:18, 20:23, 25:35]; pathprefix = 'PPI_S'; for s = 1:numel(subjects) subj = subjects(s); ...

9 years ago | 0

| accepted

Answered
how to replace a matrix element by the avearage of its surrounding elements
A=[ ... 1 2 3 ; ... 4 5 6 ; ... 7 8 9]; kernel = [ ... 1 1 1; ... 1 0 1 ; ... 1 1 1]; nei...

9 years ago | 0

Answered
function handle and Subfunction in the command window
Hi, the file *myfun1.m* contains two functions, one is the main function *myfun1* , the other is a _local_ function and can n...

10 years ago | 0

| accepted

Answered
Change automatically colors and line style
Yes it's possible. Check the predefined colormaps here: <http://www.mathworks.se/help/matlab/ref/colormap.html Matlab colorma...

10 years ago | 1

Answered
hi .i am browsing image file from source and i want to check accuracy with input image .how to match both image
doc imread <http://www.mathworks.se/company/newsletters/articles/matrix-indexing-in-matlab.html Matrix indexing>

10 years ago | 0

Answered
How to make nice plots?
You can use the hidden LineSmoothing property. Something like this: a = [1.23, 2.34, 5.55, 7, 13.21, 15.66, 18, 20] x = ...

10 years ago | 0

Answered
overwrite matrix A with matrix B (which has another size)
matrix_b = [zeros(1,57) matrix_a]; clear matrix_a matrix_a = matrix_b;

10 years ago | 0

| accepted

Answered
Tools for bi- multiple exponential decay of a MRI pixel
If you want another model, simply change this line g = fittype('a0*exp(-x/t2)','coefficients',{'a0','t2'}); to something...

10 years ago | 0

Answered
command history, update from R2013a to R2014a
New versions are installed in a separate folder in C:\Program Files\MATLAB\ so you should be able to start R2013a from C:\Progra...

10 years ago | 0

| accepted

Answered
Error using .* Matrix dimensions must agree.
Transpose *win* X=[X ; fft(x1.*win')] and append *x* correctly: x=[x ; zeros(z,1)];

10 years ago | 2

| accepted

Answered
"Size inputs must be scalar".
Here is one problem: T = [1000 10000 100000] uexac = zeros(T+1,X+1); T is a vector. *zeros(m,n)* creates ...

10 years ago | 1

Answered
Plot of binary data
If you want to show each value in binary for 50 seconds binary =[1 1 0 1 0 0 1 0]; figure; for idx = 1 : length(b...

10 years ago | 0

| accepted

Answered
Tools for bi- multiple exponential decay of a MRI pixel
use *fittype* to create your fittype object, and pass that to the *fit* command. Something like this g = fittype('a0*exp(...

10 years ago | 0

Answered
Remove duplicates from array for landmark sequence generation
perms(x(2:end-1)) gives you all paths. Add ones and sixes with [repmat(1,factorial(4),1) perms(x(2:end-1)) repmat(6,fa...

10 years ago | 0

Answered
How to compare the index of first 12 values with the next set of 12 values?
Assuming *handles.GEN.kWhprice* is a structure with two fields, one for last year and one for this: if ~all(handles.GEN.kWhp...

10 years ago | 0

Answered
Convert a GUI into a .exe,but it is very big!
Are you using other functions that are very big, or have embedded the Matlab Component Runtime? Try depfun('a.m') to se...

10 years ago | 0

Answered
how to rotate a image in gui?
imrotate

10 years ago | 0

Answered
Checking variables are valid for a set of conditions.
You have got *AND* mixed up with *OR* . *N<1 AND N>8000* can never be true. You should use *OR* instead. *OR* is *|*

10 years ago | 0

| accepted

Answered
how to use fourier transform to analyze time series data?
Hi, your question is not very clear but look up the *fft* command

10 years ago | 0

Answered
matrix visualization using imagesc
range = [0 100]; imagesc(A,range)

10 years ago | 0

Answered
how can I see what has been entered in the GUI1 and / or when I get back from the selected GUI2
Hi, If I understand this correctly, in some callback in GUI1, you are calling GUI2 and closing GUI1? You want to pass on para...

10 years ago | 0

Answered
How to connect six scripts of matlab??
I would suggest you turn your scripts into functions and create a script that calls the functions. If that's not possible, y...

10 years ago | 0

| accepted

Answered
what is the best function to comper between images
It depends on what you want to compare. *imshowpair* is probably a good start

10 years ago | 0

| accepted

Answered
Masking dicom multiple files with same mask
Hi, you should load all your dicom files into a 3D matrix. Then, make your mask 3D using repmat. Your code should look someth...

10 years ago | 0

| accepted

Answered
Drawing a rectangle with special specifications
figure; axes('XLim', [-50 200],'YLim', [-50 200]); line([0 172],[172 172],'LineWidth',5,'Color',[0 0 0]) line([17...

10 years ago | 0

Answered
How to use a vector as input for a function?
From your question, you seem to get this error only when u is a vector and not when it is a scalar? It looks like the calc_fi...

10 years ago | 0

Load more