回答済み
Cogent and Matlab2013b compatibility?
The cogent toolbox is very old. It might simply not work with recent MatLab releases or even with windows newer than XP. You cou...

約12年 前 | 0

回答済み
How to store indexed values from a for loop
Like with C, you can store them in a cell array v = cell(size(C)) for j=1:numel(C) ... [K, v{j}] = convexH...

約12年 前 | 0

| 採用済み

回答済み
Giving names to different files automatically
Maybe you can use structures? MyStructure.A = 8 ; MyStructure.B = 1:5 ; MyField = 'A' result = 2 * MyStructure...

約12年 前 | 0

回答済み
Giving names to different files automatically
Rethink your programming style critically. The basic idea about variables is that their contents change during execution of the ...

約12年 前 | 0

回答済み
Cogent and Matlab2013b compatibility?
Have you added the folder with a all the functions to the matlab path? what does, for instance, which cgopen give you?

約12年 前 | 0

回答済み
Binornd draws '1' every time
what if you execute which binornd just before the calls? Do the outputs differ based on the situation (script vs. comman...

約12年 前 | 0

回答済み
How do I smooth a plot ?
You want to apply 2D (3D?) smoothing filters, which is quite easy if you have the signal processing toolbox. You can also search...

約12年 前 | 0

回答済み
Adding vertical line to plot?
You might also be interested in GRIDXY on the File Exchange: <http://www.mathworks.com/matlabcentral/fileexchange/9973-gridxy...

約12年 前 | 0

回答済み
find X of corresponding local minima
Finding minima of a signal X is the same as finding the maxima of the signal *-X*

約12年 前 | 0

| 採用済み

回答済み
Can someone give me a quick project to write?
Programming these games will learn you about flow control, contingencies, matrices, graphics, input validation, etc: (in order o...

約12年 前 | 0

| 採用済み

回答済み
create 3*3 matrix around a given pixel
One solution: img = zeros(6,7) a = [4 3] img(a(2),a(1)) = 1 B = [1 1 1 ; 1 0 1 ; 1 1 1]; img2 = conv2(img, B ,'...

約12年 前 | 0

| 採用済み

回答済み
Taking the mean of rows in a structure array
I assume NM is your 300 element structure array. with NM(k).data holding the 3453 data points of the kith element of the struct...

約12年 前 | 0

回答済み
Find numeric columns in a cell array
% C is a cell array, like C = {1 2 3 4 5 ; 11 '12' 13:15 14 []} q = cellfun(@(x) isnumeric(x) && numel(x)==1, C) % tru...

約12年 前 | 1

| 採用済み

回答済み
x and y intercepts
You want to fit a line to your x,y points and then solve the fitted line for y is zero and x is zero, giving you the x- and y-in...

約12年 前 | 1

回答済み
How do I use the results of the polyfit command for the rest of my code?
Useully you would like to use the parameters of the fit to obtained fitted values. Something along these lines, perhaps? x ...

約12年 前 | 0

回答済み
Generating random number between 1 to 10
In matlab you can directly loop over a vector (no need for indexing) V = randperm(10) % example vector for x = V %...

約12年 前 | 2

回答済み
convert time stamp into minutes or seconds
I assume the 3rd column represents a value. [D,T,V] = textread('MyFile.txt','%s%s%f') DT = datevec(strcat(D,'-',T),'dd.m...

約12年 前 | 0

回答済み
How can I get out the row numbers in where there are numbers except for zeroes?
RowNumber = find(ColumnVector)

約12年 前 | 0

| 採用済み

回答済み
Fast creation of vector [0 0 1 1 2 2 3 3... n n]
n = 10 % max value k = 3 % number of repetitions V = floor((0:k*(n+1)-1)/k)

約12年 前 | 2

回答済み
How can i remove this logical operator error?
One of the terms is not convertible to a logical scalar. Most likely, one or both of these terms are arrays. What does siz...

約12年 前 | 0

| 採用済み

回答済み
How do you transform a vector of numbers into a cell of strings?
A = [1:5].' B = arrayfun(@(x) num2str(x),A,'un',0)

約12年 前 | 2

| 採用済み

回答済み
How can I get "least frequent" number from a vector?
Option 1: You can copy the code from mode.m and replace the function max by the function min on line 130 (in R2014a). Edit the h...

約12年 前 | 3

| 採用済み

回答済み
permutation without replacement matrix
% a smaller example k = 2 ; n = 4 ; v = perms(1:k) % all permutations of values 1:k v = [zeros(size(v,1),1) v...

約12年 前 | 2

| 採用済み

回答済み
How to remove rows with any string from matrix
Assuming that the rows are lines of a text file: T = textread('data.txt','%s','delimiter','\n') T2 = T(~cellfun(@(x)...

約12年 前 | 0

| 採用済み

回答済み
How to Find Column Duplicates
X = A{1} X = X(:,3) % just column 3 [a,i,j] = unique(X) % find all unique elements n = histc(j,1:numel(a)) % ...

約12年 前 | 1

| 採用済み

回答済み
Extract numbers between two underscores.
str = 'Color_84_2014-01-31-16-49-31-702.jpg' num = sscanf(str,'Color_%d') If your strings are stored in a cell array of...

約12年 前 | 1

回答済み
read data from variables with names matching patterns
X = load('StudentsMatfile.mat') ; LABELS = fieldnames(X) ; N = numel(LABELS) DATA = cell(N,1) for k=1:N DATA...

約12年 前 | 1

回答済み
How do I determine the number of headerlines in a text document?
Read the file as strings and parse the strings. The following might work (at least it works when I copied your example into a fi...

約12年 前 | 3

回答済み
Store columns in a matrix in different variables
Why do you want to do this? It is much easier to deal with a specific column using indexing A(:,13) then using variable names li...

約12年 前 | 0

回答済み
How to make a linear regression line?
The function <http://www.mathworks.nl/help/stats/lsline.html LSLINE> will add a linear regression line to a plot.

約12年 前 | 0

さらに読み込む