Respondida
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...

más de 7 años hace | 0

| aceptada

Respondida
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 ...

más de 7 años hace | 1

| aceptada

Respondida
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...

más de 7 años hace | 0

| aceptada

Respondida
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...

más de 7 años hace | 1

Respondida
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...

más de 7 años hace | 1

| aceptada

Respondida
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 ...

más de 7 años hace | 0

| aceptada

Respondida
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...

más de 7 años hace | 0

| aceptada

Respondida
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...

más de 7 años hace | 0

| aceptada

Respondida
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 ...

más de 7 años hace | 0

Respondida
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...

más de 7 años hace | 1

| aceptada

Respondida
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...

más de 7 años hace | 0

Respondida
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 ...

más de 7 años hace | 1

Respondida
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);

más de 7 años hace | 1

| aceptada

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

más de 7 años hace | 0

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

más de 7 años hace | 0

| aceptada

Respondida
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...

más de 7 años hace | 0

| aceptada

Respondida
[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...

más de 7 años hace | 0

Respondida
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...

más de 7 años hace | 1

| aceptada

Respondida
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...

más de 7 años hace | 0

| aceptada

Respondida
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...

más de 7 años hace | 2

Respondida
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...

más de 7 años hace | 1

| aceptada

Respondida
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...

más de 7 años hace | 1

Respondida
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...

más de 7 años hace | 1

Respondida
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...

más de 7 años hace | 2

| aceptada

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

más de 7 años hace | 0

| aceptada

Respondida
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

más de 7 años hace | 0

Respondida
Sorry guys for disturbing.I'm facing a problem in get rid the vertical line in my piecewise function.My teacher asked me to used fplot but I do know how to make it discontinuous at y-axis from 2 to 5.Please somebody help me.I have to submit it soon.
You were fairly close. I chose to use the fplot function, as you were apparently instructed to do so. I use the code below to se...

más de 7 años hace | 1

Respondida
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...

más de 7 años hace | 0

| aceptada

Respondida
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...

más de 7 años hace | 0

| aceptada

Respondida
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...

más de 7 años hace | 0

| aceptada

Cargar más