回答済み
How to create a function which accepts a name of a mat-file and returns a structure array with fields’ Name and Size?
Lets go through your proposed code: function se=se(name)%don't give your ouput the same name to your output as your function f...

約2ヶ月 前 | 1

| 採用済み

回答済み
How can I append same size matrix vertically?
Nothing here is happening automatically. With the comma you are telling Matlab that you want to concatenate horizontally. If you...

約2ヶ月 前 | 1

回答済み
How to find the indices of a data column that aren't Nan, and how to use those indices to concatenate a vector?
The not function (or simply ~) doesn't have a second output. Luckily you don't need it. You can directly use its output to perfo...

約2ヶ月 前 | 0

| 採用済み

回答済み
How to read images from one directory into variables using loop?
You don't want numbered variables. Try a cell array instead. That way you can much more easily loop through your images to do th...

約2ヶ月 前 | 0

回答済み
Do I need to reference matlab in an academic paper?
That depends a bit on the context and the journal. You can ask your supervisor what they think. Personally I also do some parts ...

約2ヶ月 前 | 0

回答済み
how to get image from specific folder and resize each image and save them is a new folder
This is how you can provide the full path to imread: for K = 1 : length(dinfo) thisimage = dinfo(K).name; Img = imread(...

約2ヶ月 前 | 0

回答済み
How do I sort filenames base on the numbers right before file name in MATLAB?
This should to the trick. Note that this will return an error if there is no match. names={'example_1.mat','example_15.mat','ex...

約2ヶ月 前 | 0

| 採用済み

回答済み
Using vectorization on a problem to reduce For loops, how to use conditional statement?
You can find an explanation of logical indexing on that page you linked. The most important thing if you want to vectorize an o...

約2ヶ月 前 | 1

回答済み
Excluding date from date and time
You can probably also do this with the datetime class, but when you still have your time in the datenum format, you can simply s...

約2ヶ月 前 | 0

| 採用済み

回答済み
Renaming folders with different names
You can use something like this %untested code list=dir('D:\ToM_3_LEVEL1_ONLY\ToM_00\*'); list=list([list.isdir]);%keep only ...

約2ヶ月 前 | 0

回答済み
uicontrol issues on figure
It may take some getting used to how to build a GUI with Matlab, but once you get the hang of it you'll find it gets easy. To ke...

約2ヶ月 前 | 1

| 採用済み

回答済み
creating a vector from a bin count
You could of course do this with a loop (or cellfun), but I think a more elegant solution is with cumsum instead. data=[0 5; 1 ...

約2ヶ月 前 | 0

回答済み
how to make sure image resolution?
Some cameras store the orientation in the EXIF data, which Matlab generally ignores. In my PhotoAnnotation tool I used an extern...

約2ヶ月 前 | 1

| 採用済み

回答済み
Joining every eight columns in a matrix
Although it might visually be joining characters, that is not necessarily what you need. The code below should be one of the fas...

約2ヶ月 前 | 0

| 採用済み

回答済み
how can i find mean of a plotted graph?
The thing you are asking is slightly different from what is generally meant with 'mean'. The code below shows two interpretation...

約2ヶ月 前 | 2

| 採用済み

回答済み
how to run same command for sequence of files
Use a loop. Using numbered variables is generally a bad idea. Consider using an array to store everything. If you use the same n...

約2ヶ月 前 | 0

回答済み
to print following pattern
You mean like this? for k=1:9 a=str2double(char('0'+(1:k))); b=a*8+k; fprintf('%d x 8 + %d = %d\n',a,k,b) end

約2ヶ月 前 | 1

| 採用済み

回答済み
Insert blank/NaN rows in a column
This example should work. Don't forget to add NaN values to your x-parameter as well. Alternatively, you could plot them as sep...

2ヶ月 前 | 0

| 採用済み

回答済み
create columns with for loop
This should help you solve it: Rows_I_need=[500, 1000, 2500]; %generate random array as input array=randi(3,4000,1); %get ...

2ヶ月 前 | 0

| 採用済み

回答済み
How can i extract numerical intensity values from an image
You can make use of the fact that an image is already a matrix. Instead of ndgrid (as used in this code), you could also conside...

2ヶ月 前 | 0

| 採用済み

回答済み
Calculate the volume of a CAD part
An example to work with would make this easier to answer. The bounding box should be fairly straightforward: just take the min ...

2ヶ月 前 | 0

回答済み
Using loop instead of hardcoding
Please post your code as code instead of a picture. What exact function are you using? The only midpoint function I can find in ...

2ヶ月 前 | 0

回答済み
Plot a my own created function
Your output is sometimes complex. You should fix this in your function, but you can also apply a quick fix here: fplot(@(Lambda...

2ヶ月 前 | 0

| 採用済み

回答済み
Find the earliest common date and indicator of two date vectors.
This answer assumes you have your dates in a datetime format. If you don't it should be relatively easy to convert to it. If you...

2ヶ月 前 | 1

回答済み
"patch" command error
I suspect you generated the vertex IDs in a programming language that is zero-indexed, instead of one-indexed. If that is the ca...

2ヶ月 前 | 1

| 採用済み

回答済み
Figure editing shortcut missing
Edit: You can open the plot tools with the plottools function. You can probably add this as a custom button, but otherwise the ...

2ヶ月 前 | 1

| 採用済み

回答済み
Presenting 48 images in 4 conditions where each image is presented only once?
Do you mean something like this? %generate some empty structs for testing %(replace by appropriate calls to the dir function) ...

2ヶ月 前 | 0

回答済み
Will m files work that were made in matlab R2018a work in matlab R2017b?
You can check the release notes to see if you're using functions that were introduced in R2018a, but I suspect from your descrip...

2ヶ月 前 | 1

| 採用済み

回答済み
How to convert row and column data into x,y,flag format?
BW1=[0 0 1;1 1 0];%example matrix [Y,X]=ndgrid(1:size(BW1,1),1:size(BW1,2)); data=[X(:) Y(:) BW1(:)];

2ヶ月 前 | 1

回答済み
Intensity profile of an image
improfile should work

2ヶ月 前 | 0

Load more