Risposto
from 2d to 3d conversion of segmented images having an issue of splitting the organ. how to solve this problem?
If you segment an organ on each slice separately, you might end up with a non-contiguous result. So how did you make sure you ha...

oltre 7 anni fa | 0

| accettato

Risposto
error starting a GUI
That .fig file is not the complete GUI, it is only the visible elements. The callback functions it references are not contained ...

oltre 7 anni fa | 1

| accettato

Risposto
Why is 2014b faster?
This question pops up from time to time. Every now and then, some functions are redesigned. Of course not all functions would b...

oltre 7 anni fa | 0

| accettato

Risposto
how to fit implicit function to data
Or, if you don't have the curve fitting toolbox (or the optimization toolbox), you can use fminsearch. The code below might be a...

oltre 7 anni fa | 1

Risposto
VERY URGENT::::: My code is giving me this error: Index in position 2 is invalid. Array indices must be positive integers or logical values. Can you please resolve this for me? It is very urgent and due in two days!!!
There are many issues with your question. The most important one is this: your question is not urgent. After that, you do an el...

oltre 7 anni fa | 1

| accettato

Risposto
How do I increase precision in my variables
This has to do with the way Matlab stores non-integer values: as floating point numbers. With the eps function you can retrieve ...

oltre 7 anni fa | 0

| accettato

Risposto
I am trying to write a code to solve a simple problem as shown below. I believe what am I am doing is correct up until i begin the spline fitting method. Am i interpolating correctly?
I just read the documentation page for interp1, and it turns out you are using this syntax: vq = interp1(v,xq,method) What you...

oltre 7 anni fa | 0

| accettato

Risposto
how to control fitting in 'lsqcurvefit'?
Since you can calculate B(2) based on B(1), your function has actually only a single dependent, so you can adapt your function l...

oltre 7 anni fa | 0

| accettato

Risposto
Find area from a binary image
I would expect you want to know the number of pixels in that blob. If that is the case, than you should use regionprops. There ...

oltre 7 anni fa | 0

Risposto
gui with guide:
You can use the callback functions of the dependent buttons to set the value property to 0 if the main radio is set to 0. This s...

oltre 7 anni fa | 1

| accettato

Risposto
How to find when the value is 0 in an array?
This answer contains code to find the zero crossing in a vector https://www.mathworks.com/matlabcentral/answers/267222-easy-way...

oltre 7 anni fa | 0

Risposto
Pushbutton GUI for code
I would encourage you to just try out some code. You should look into the uicontrol function to create buttons. You can use the ...

oltre 7 anni fa | 1

Risposto
how to precise the number of digits in MATLAB?
You can generate a name like that with the sprintf function: number=2; name=sprintf('gt%06d',number);

oltre 7 anni fa | 1

| accettato

Risposto
Plot two sets of markers in GUI
Use hold on or its equivalent: set the NextPlot axes property to 'add'.

oltre 7 anni fa | 0

Risposto
Discard unwanted information from string array
Try something like this: expr='(.*alt=")'; regexprep(str,expr,'')

oltre 7 anni fa | 0

| accettato

Risposto
How to Implement an “imshow” function?
If you mean the scaling of any range of values to [0 1], than the code below does what you need. IM=uint8(randi(255,50,50));%ge...

oltre 7 anni fa | 0

| accettato

Risposto
[DISCONTINUED] MATLAB Answers Wish-list #4 (and bug reports)
It sometimes happens that someone posts a question, recieves some comments, doesn't respond to them, and posts a duplicate. When...

oltre 7 anni fa | 0

Risposto
How modifying the input of a function : from (unique) vector to matrix ?
You can always add a recursive call in case of a matrix input. Also, to keep your code understandable you should write a short b...

oltre 7 anni fa | 1

| accettato

Risposto
operands to the and && operators must be convertible to logical scalar values. This error appears in app designer. Why does this happen?
The use of globals makes this an impossible task to debug. How are you making sure they are non-empty scalar values? If they are...

oltre 7 anni fa | 0

| accettato

Risposto
how to save current date and time to a text file
There are three main issues here: you are printing the literal string 'time' to the file, instead of the contents of the time va...

oltre 7 anni fa | 2

Risposto
How to get a small GUI window figure which is saved before?
You can edit the addNewUserGUI function to accept pre-filled information. You can use this to set the Value parameter of each dr...

oltre 7 anni fa | 1

| accettato

Risposto
I have a 4D data set (x,y,h,t) and will like to multiply it by a 2D (x,y) map. The x and y; for both datasets are equal. How do i multiply them so that the result will remain a 4D dataset with the same dimensions as the original dataset?
You can use repmat, but if you're using a relatively new release of Matlab you shouldn't need to: %generate example data A=ran...

oltre 7 anni fa | 1

Risposto
Using the bar Function
Your code can be improved in many ways, but I kept your code as it was in the block below. You shouldn't shadow the sum function...

oltre 7 anni fa | 1

Risposto
plot 3D point data
You should be able to use the surf function. The only problem you have is interpolating the data to a normal grid that surf unde...

oltre 7 anni fa | 2

| accettato

Risposto
is there any function that convert negative value to zero?
somefunction=@(x) (abs(x)+x)/2;

oltre 7 anni fa | 0

| accettato

Risposto
Hi, I'm kind of new to matlab, I would like to turn this into a for loop. How should i do it?
c1 = EMGrsmpl(step1{1,end-10},100); c1(1,10)=0;%extend for k=2:10 c1(:,k) = EMGrsmpl(step1{1,end-11+k},100); end

oltre 7 anni fa | 0

Risposto
How to calculate the value of natural log 'e' in Matlab?
Please try Google next time before you ask a question (and have a look here). The method to calculate the natural log is simply...

oltre 7 anni fa | 0

| accettato

Risposto
How to count first identical elements without a for cycle?
In case you want to measure the run length of the first run: data=[3 3 3 3 3 4 1 1 0 0 0 5 6 3 3 1 1 1]; output=find(diff(da...

oltre 7 anni fa | 0

| accettato

Risposto
finding the mean and max
The first column you can achieve with unique, the second and third can be done with accumarray. x=[ 1 1 1 2 2 1 1 3 1 ; 2 3 2 4...

oltre 7 anni fa | 0

| accettato

Carica altro