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

más de 6 años hace | 1

| aceptada

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

más de 6 años hace | 0

| aceptada

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

más de 6 años hace | 0

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

más de 6 años hace | 0

| aceptada

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

más de 6 años hace | 0

| aceptada

Respondida
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,:)=[];

más de 6 años hace | 0

| aceptada

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

más de 6 años hace | 0

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

más de 6 años hace | 0

| aceptada

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

más de 6 años hace | 0

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

más de 6 años hace | 0

| aceptada

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

más de 6 años hace | 0

| aceptada

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

más de 6 años hace | 0

Respondida
Is there any way to adjust the appearance of the menu dialog box?
You can make your own from scratch.

más de 6 años hace | 0

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

más de 6 años hace | 0

| aceptada

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

más de 6 años hace | 0

| aceptada

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

más de 6 años hace | 3

| aceptada

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

más de 6 años hace | 0

Respondida
Distance betwen 3d points
If you have the statistics toolbox you can use pdist2.

más de 6 años hace | 1

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

más de 6 años hace | 1

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

más de 6 años hace | 0

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

más de 6 años hace | 0

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

más de 6 años hace | 0

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

más de 6 años hace | 0

| aceptada

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

más de 6 años hace | 0

| aceptada

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

más de 6 años hace | 0

| aceptada

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

más de 6 años hace | 0

| aceptada

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

más de 6 años hace | 0

| aceptada

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

más de 6 años hace | 2

| aceptada

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

más de 6 años hace | 0

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

más de 6 años hace | 1

| aceptada

Cargar más