回答済み
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: % ...

6年以上 前 | 1

| 採用済み

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

6年以上 前 | 0

| 採用済み

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

6年以上 前 | 0

回答済み
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);

6年以上 前 | 0

| 採用済み

回答済み
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...

6年以上 前 | 0

| 採用済み

回答済み
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,:)=[];

6年以上 前 | 0

| 採用済み

回答済み
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...

6年以上 前 | 0

回答済み
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 ...

6年以上 前 | 0

| 採用済み

回答済み
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 ...

6年以上 前 | 0

回答済み
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...

6年以上 前 | 0

| 採用済み

回答済み
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...

6年以上 前 | 0

| 採用済み

回答済み
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...

6年以上 前 | 0

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

6年以上 前 | 0

回答済み
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...

6年以上 前 | 0

| 採用済み

回答済み
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(...

6年以上 前 | 0

| 採用済み

回答済み
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,...

6年以上 前 | 3

| 採用済み

回答済み
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, ...

6年以上 前 | 0

回答済み
Distance betwen 3d points
If you have the statistics toolbox you can use pdist2.

6年以上 前 | 1

回答済み
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...

6年以上 前 | 1

回答済み
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...

6年以上 前 | 0

回答済み
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.

6年以上 前 | 0

回答済み
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...

6年以上 前 | 0

回答済み
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 ...

6年以上 前 | 0

| 採用済み

回答済み
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...

6年以上 前 | 0

| 採用済み

回答済み
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....

6年以上 前 | 0

| 採用済み

回答済み
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...

6年以上 前 | 0

| 採用済み

回答済み
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 ...

6年以上 前 | 0

| 採用済み

回答済み
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...

6年以上 前 | 2

| 採用済み

回答済み
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...

6年以上 前 | 0

回答済み
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...

6年以上 前 | 1

| 採用済み

さらに読み込む