Réponse apportée
How to save an average voxel values from multiple ROIs in a dicom slice?
BW1 = createMask(e, I); Data=I(BW1); Now you can calculate the statistics you need. I would suggest using a struct array: % ...

plus de 6 ans il y a | 1

| A accepté

Réponse apportée
Remove/Refresh all Fields
Yes, although you should consider changing your data structure. handles = struct;%will do what you ask You should store ...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Create a mask based on pixel values
IM = uint8(randi(255,100,80)); L= IM >=50 & IM <=125;

plus de 6 ans il y a | 0

Réponse apportée
How to calculate r squared from a given cos regression model
y_fit = a ∗ cos(5*x) err=y-y_fit; SSres=sum(err.^2); SStot=sum((y-mean(y)).^2); rsq=1-(SSres./SStot);

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
plot shifting while using histcounts
You are specifying the number of bins, not the exact bins. Then when you are plotting you don't specify the x-value. If you chan...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
I have daily data from 1969 to 2018. I want to remove the rows corresponding to 29-02 day from the matrix. How should I proceed?
[num,txt]=xlsread('Sample.xlsx'); t=datetime(txt); L=day(t)==29 & month(t)==2; num(L,:)=[]; t(L,:)=[];

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
How to reset the pop-up menu value in GUI?
If you need something in your base workspace to be updated when you change things in your GUI, you could consider a programmatic...

plus de 6 ans il y a | 0

Réponse apportée
How to pass a table generated from a function back to app-designer?
Can't you do something like this? app.T1=Function1(app, app.Path, app.File.Value); Of course that would require you to change ...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Is ifft(fft(x).*fft(h)) faster or conv(x,h) ?
Why would a textbook say ifft(fft()) is faster? That doens't make sense. If that was the case, Mathworks would have implemented ...

plus de 6 ans il y a | 0

Réponse apportée
need help in creating a loop
You can use the for keyword to start a loop. x=input('Enter amount of data needed to be entered:'); for n=1:x y(n)=in...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Passing variables in GUI vs. assignin then evalin
To answer the question of how to do it with guidata: %this stores data to your figure: guidata(hObject,handles) %this ret...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Passing variables in matlab GUI
You should store your variable in the guidata struct. That way you can easily share it across different callback functions. I...

plus de 6 ans il y a | 0

Réponse apportée
Is there any way to adjust the appearance of the menu dialog box?
You can make your own from scratch.

plus de 6 ans il y a | 0

Réponse apportée
How to use slider in matlab for varying two values in graph?
You should create the plot and use the slider callback function to modify the underlying data. The code below should get you mo...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Filtering with non-zero initial conditions
See if the code below works for your purpose. totaltime=2;%in minutes samplerange=totaltime/0.5;%30 seconds/row data=randi(...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Filter a matrix of data
Just use logical indexing: N=100;data=randi(100,N,2)/2;%generate random data L=data(:,1)<25 & data(:,2)>30; newdata=data(L,...

plus de 6 ans il y a | 3

| A accepté

Réponse apportée
Finding the ratio of numbers in an array
rois=data{1, i}(31:end,2)./data{1, i}(1:(end-30),2); In your current loop you are overwriting your result every iteration, ...

plus de 6 ans il y a | 0

Réponse apportée
Distance betwen 3d points
If you have the statistics toolbox you can use pdist2.

plus de 6 ans il y a | 1

Réponse apportée
relation between two variable
You can plot a 3D scatter plot with scatter3. To get your function you will need more points. You will need at least the same n...

plus de 6 ans il y a | 1

Réponse apportée
Help!!! How do I do loops to fill certain parts of the matrix?
I suspect it is easier to create a checkerboard pattern and replicate that to get enough pixels. It is also a good idea to tr...

plus de 6 ans il y a | 0

Réponse apportée
i would like to have the license key of my license
I can find my license number if I go to the my account page. Otherwise you will have to contact Mathworks support directly.

plus de 6 ans il y a | 0

Réponse apportée
where to save the function file to work?
You need to make sure your function can be found by Matlab by placing it on the path. The general advice is to have a folder wh...

plus de 6 ans il y a | 0

Réponse apportée
question to continue the code
As the documentation states, rmdir only works for empty folders. If you want to remove all files and folders inside that folder ...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Getting rid of duplicate values in pairwise matrix to obtain single vector?
The easiest is the pragmatic approach: get the counts with histcounts and divide that by 2. X=randn(100,1); [N,edges] = histco...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
how do you find solutions of this marix equation using matlab 2019
Let's first do some algebra, and then solve it with a oneliner: %{ Ax = b A\Ax = A\b (A\A = 1) x = A\b %} A = [3.8 -7....

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
How can I fit this data?
Your model function contains some redundant terms that should be merged. Below you find the code to estimate your parameters and...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
how to use buitin functions like fcm in gui?
A GUI in Matlab is nothing special. You need to have working code first, and then put that into a GUI. If you have trouble with ...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
how to get an matrix as an output in a function
The mlint is giving you a hint: it wants you to put a semicolon to suppres output. Why would you have an output with the for loo...

plus de 6 ans il y a | 2

| A accepté

Réponse apportée
class vs data type?
In general I would consider 'class' a superset of 'data type' and only include the core Matlab clases a list of data types, so t...

plus de 6 ans il y a | 0

Réponse apportée
Defining scatter plot with different 'markers' & 'colors'
This should be close to what you need: test = xlsread('HQ3.xlsx', 'A2:D223'); x=test(:,1); y=test(:,2); z=test(:,3); groups...

plus de 6 ans il y a | 1

| A accepté

Charger plus