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

mehr als 6 Jahre vor | 1

| akzeptiert

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

mehr als 6 Jahre vor | 0

| akzeptiert

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

mehr als 6 Jahre vor | 0

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

mehr als 6 Jahre vor | 0

| akzeptiert

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

mehr als 6 Jahre vor | 0

| akzeptiert

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

mehr als 6 Jahre vor | 0

| akzeptiert

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

mehr als 6 Jahre vor | 0

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

mehr als 6 Jahre vor | 0

| akzeptiert

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

mehr als 6 Jahre vor | 0

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

mehr als 6 Jahre vor | 0

| akzeptiert

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

mehr als 6 Jahre vor | 0

| akzeptiert

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

mehr als 6 Jahre vor | 0

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

mehr als 6 Jahre vor | 0

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

mehr als 6 Jahre vor | 0

| akzeptiert

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

mehr als 6 Jahre vor | 0

| akzeptiert

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

mehr als 6 Jahre vor | 3

| akzeptiert

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

mehr als 6 Jahre vor | 0

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

mehr als 6 Jahre vor | 1

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

mehr als 6 Jahre vor | 1

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

mehr als 6 Jahre vor | 0

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

mehr als 6 Jahre vor | 0

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

mehr als 6 Jahre vor | 0

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

mehr als 6 Jahre vor | 0

| akzeptiert

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

mehr als 6 Jahre vor | 0

| akzeptiert

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

mehr als 6 Jahre vor | 0

| akzeptiert

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

mehr als 6 Jahre vor | 0

| akzeptiert

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

mehr als 6 Jahre vor | 0

| akzeptiert

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

mehr als 6 Jahre vor | 2

| akzeptiert

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

mehr als 6 Jahre vor | 0

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

mehr als 6 Jahre vor | 1

| akzeptiert

Mehr laden