Novice programmer here. I'm writing a program that analyzes the relative spatial locations of points (cells). The program gets boundaries and cell type off an array with the x coordinate in column 1, y coordinate in column 2, and cell type in column 3. It then checks each cell for cell type and appropriate distance from the bounds. I...
I have developed two differing methods in MATLAB which aim to analyse a pop song and then automatically create a 30 second audio thumbnail (a preview clip) containing part of the chorus section.
Both methods have varying results:
The first method can create a thumbnail for each track, managing to find a chorus section in 40 out of 50...
Following is the statement inside my code I am using in Matlab:
[h_sgsim,p_sgsim,ci_sgsim] = ttest(q_mean_sgsim_yearly_TankMethod,q_mean_reference_truth_yearly_TankMethod(1));
where q_mean_sgsim_yearly_TankMethod is a 100 X 1 vector and q_mean_reference_truth_yearly_TankMethod(1) is a scalar.
I don't know why its giving the error ev...
I am reading data in from a url, parsing it, and then attempting to format the data further:
year = 2008;
month = 9;
day = 30;
raw = urlread(sprintf('http://www.wunderground.com/history/airport/KCVS/%i/%i/%i/DailyHistory.html?HideSpecis=0&theprefset=SHOWMETAR&theprefvalue=0&format=1',year,month,day));
data = textscan(raw,'%...
Referencing and assigning a subset of a matlab dataset appears to be extremely inefficient and possibly scales like rows^2
Example:
alldata is a large dataset of mixed data - say 150,000 rows by 25 columns (integer, boolean and string).
The format for the dataset is:
'format', '%s%u%u%u%u%u%s%s%s%s%s%s%s%u%u%u%u%s%u%s%s%u%s%s%s%s%u...
After we write a code in Matlab we can use ctrl+A+ctrl+I and ctrl+A+ctrl+J to format our code (comments, loops alignment etc). Is there something similar or any helpful keyboard shortcuts in Python?
Also, just like we can use upward arrow to copy our previous command window history in Matlab, is it possible or some keyboard shortcut to ...
I need to make an image pyramid in matlab for one of my assignments. Though there are inbuilt methods to get the individual images in the pyramid, I am confused about how to store the handles to the images. (I don't have much experience with matlab)
Arrays don't work, since the images in the pyramid are of different size. I am looking f...
When trying to plot a normal PDF with mean=0 and standard deviation=20 using the MATLAB command normpdf() I get weird results, see picture.
The code used to plot the figure is as follows:
plot(normpdf((-100:0.1:100),0,20))
What is the correct way of using this function?
...
MATLAB has a magnificent robustfit function that solves the problem of excluding outliers with linear regression fitting. Is there anything similar written in Java or C (or in language X that could be adopted)?
...
I'm halfway through figuring out a solution to my question, but I have a feeling that it won't be very efficient. I've got a 2 dimensional cell structure of variable length arrays that is constructed in a very non-functional way in Matlab that I would like to convert to Clojure. Here is an example of what I'm trying to do:
pre = cell(...
I have a data which is 100x1 vector. How can I display its empirical pdf in Matlab? Also, if I want to compare the pdf of three vectors on the same graph, then how to do that?
Right now I am using pdfplot.m file to plot my empirical pdf, however when I want to compare the 3 distributions by using 'hold on', then firstly its not working ...
Hi
I am trying to perform a comparison between the rows of two matrices A and B with the same number of columns.
In matlab the command "ismember(a, b, 'rows')" returns a vector containing 1 where the rows of A are also rows of B and 0 otherwise, and also returns the highest index in B for each element in A that is a member of B.
[tf, ...
I'm using xming 6.9.0.31 on Windows XP computer (2 Gb RAM) to connect to Linux server and run Matlab scripts there. I have 2 configurations of xming and both have problems related to matlab output figures.
In one configuration everything works on the first script run, all figures coms fine. But on the second run (of the same script) xmin...
Hi. For my work I have to set up a project in Matlab, which is not my language of choice and I have some questions regarding efficiency.
I am currently dealing with a collection of points with several properties. Rather than putting all of these in separate arrays of equal length I would much prefer to make a single array of Point objec...
I would like to add arrows to a plot of a line in Matlab to illustrate flow. The arrows would ideally be on the line pointing in the direction of the line. Is this possible?
...
Starting from the plot of one curve, it is possible to obtain the parametric equation of that curve?
In particular, say x={1 2 3 4 5 6....} the x axis, and y = {a b c d e f....} the corresponding y axis. I have the plot(x,y).
Now, how i can obtain the equation that describe the plotted curve? it is possible to display the parametric ...
If I have a set of data Y and a set of bins centered at X, I can use the HIST command to find how many of each Y are in each bin.
N = hist(Y,X)
What I would like to know is if there is a built in function that can tell me which bin each Y goes into, so
[N,I] = histMod(Y,X)
would mean that Y(I == 1) would return all the Y in bin 1...
I'm collecting data and would like to plot the results in Matlab as they're being collected. However it seems like the file would be locked while my scripts are running. Does anyone know if the Linux version of Matlab acts differently when it opens files, and leaves them writeable by other processes?
...
Hi,
I was wondering if anybody knows of a function or a contribution in the Mathworks file exchange repository that allows me to group and ungroup variables in a similar way save and load does
Let me explain this better with an example:
/* The variables 'one_variable', 'another_variable' and 'yet_another_variable' already exist in the...
hello,
i m designing a neural network in matlab, i m doing research in speech recognition and trying to design a algorithm for speech recognition using neural network in matlab. but i want to define my structure for network,how can i define that??
...