Réponse apportée
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...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
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 ...

plus de 7 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 7 ans il y a | 1

Réponse apportée
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...

plus de 7 ans il y a | 1

| A accepté

Réponse apportée
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 ...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
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 ...

plus de 7 ans il y a | 0

Réponse apportée
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...

plus de 7 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 7 ans il y a | 0

Réponse apportée
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 ...

plus de 7 ans il y a | 1

Réponse apportée
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);

plus de 7 ans il y a | 1

| A accepté

Réponse apportée
Plot two sets of markers in GUI
Use hold on or its equivalent: set the NextPlot axes property to 'add'.

plus de 7 ans il y a | 0

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

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
[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...

plus de 7 ans il y a | 0

Réponse apportée
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...

plus de 7 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 7 ans il y a | 2

Réponse apportée
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...

plus de 7 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 7 ans il y a | 1

Réponse apportée
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...

plus de 7 ans il y a | 1

Réponse apportée
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...

plus de 7 ans il y a | 2

| A accepté

Réponse apportée
is there any function that convert negative value to zero?
somefunction=@(x) (abs(x)+x)/2;

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
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

plus de 7 ans il y a | 0

Réponse apportée
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...

plus de 7 ans il y a | 1

Réponse apportée
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...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 7 ans il y a | 0

| A accepté

Charger plus