I'm plotting on top of an image in Matlab. Sometimes, I can't see what's being plotted because the color of the image underneath is too close to the color of the image at the same location. I could just always change the color of the plot (e.g. from 'rx' to 'bx'), but that's cumbersome.
Is it possible to plot the inverse color of what...
How can I take the first row of a cell array that contains doubles and insert it into a vector, without using a 'for' loop?
...
Hi,
I would like to edit matlab scripts in two cases
(1) In matlab Command window running in a linux terminal, how to create and edit a script file? use
edit(filename)
will invoke the interactive editor, which is not desired while operating on a linux server.
(2) In emacs, is there any way to edit matlab script conveniently? Which ...
I would like to construct a histogram with unequal bins (intervals)..Matlab construct only histograms with equal bins as if it's a diagram..!!!
Please help me...thanks a lot!!
...
I have these lines in my ~/.inputrc:
set editing-mode vi
set keymap vi
This allows me to use vi keybindings in every program that uses GNU readlines for text input. Examples: python, irb, sftp, bash, sqlite3, and so on. It makes working with a command line a breeze. Matlab doesn't use readlines, but vi keybindings would be amazing...
My question is similar to this one, but I would like to replicate each element according to a count specified in a second array of the same size.
An example of this, say I had an array v = [3 1 9 4], I want to use rep = [2 3 1 5] to replicate the first element 2 times, the second three times, and so on to get [3 3 1 1 1 9 4 4 4 4 4].
S...
Is there an inbuilt function that removes the Kth row and column of a square matrix in Matlab?
Hope it's clear from the diagram:
...
I working on a possible machine learning project that would be expected to do high speed computations for machine learning using SVM (support vector machines) and possibly some ANN.
I'm resonably comfortable working on matlab with these, but primarly in small datasets, just for experimentation. I'm wondering if this matlab based approac...
I'm trying to write a MATLAB function to find the position in screen coordinates of an arbitrary window (not just a MATLAB window). The code only needs to work in the current version of MATLAB and on Windows XP.
I know I could write a MEX-file or shell out to another program, but I want to do this all with MATLAB code. It should be po...
Hi all,
I'm currently following the third tutorial listed here: here
where I'm trying to compile some matlab code into Java classes. Creating a project in eclipse, and correctly linking the libraries (exactly how its done in the tutorial). Everything actually compiles, but when I run the program I get an Unsatisfied Link error.
Exc...
i have a matrix in matlab and i need to find the 99% value for each column. That means that value such that 99% of the population has larger value than this. Is there a function in matlab for this?
...
We are doing a project on ear recognition. We have got the edges of the ear in a figure & have found the centroid of each. We have also drawn lines from the centroid at 10 degree intervals. Now we need to know how to find the points of intersection of these lines with our ear edges in matlab. Any help would be greatly appreciated.
...
How can I load a matrix data file into Matlab?
The file contains numeric data as well as strings. One line in the file corresponds to one measurement; data on the same line is separated by commas.
...
If I delcare an object to be a subclass of handle
classdef obj < handle
my object is now essentially a "pointer" to some memory somewhere. How do I find out how much memory my object is using up?
For example, say I have a class foo with a field bar
classdef foo < handle
properties
bar = randn(1000);
end
bar takes up 8 megabytes...
Hi all,
For some MATLAB code that I want to make executable, I need the location to a compiler in Windows. I have Visual Studio installed, so would I be able to reference the compiler that that uses? If so, how can I find it?
Thanks.
...
I have a 45x2 cell in MATLAB, with the first column an arbitrarily sized matrix of doubles.
Some of these matrices are repeated, whilst others aren't. I'm attempting to strip out only the unique matrices (but recording the number of repeates), and keep the second column as is.
I've tried a number of things (tabulate, hist et al) but th...
I am trying to sub-array in MATLAB with no luck.
This is what I am doing:
a = randint(latticeSize, 1, [0 1]);
% a 1st attempt which works but sucks
localPattern = [a(i-1) a(i) a(i+1)];
The above works fine but I want to generalize it with something like:
% this is how I'd like to do it as more general
localPattern = a(i-1 : i+1);
...
I would like to use 10-fold Cross-validation to evaluate a discretization in MATLAB. I should first consider the attributes and the class column.
...
I have a simple weighted tree with a root, nodes and leafs. Now I want to assign a value to every path from the root to a leaf which will be the sum of all the weights.
Is there a way of creating a structure with 2 fields: the value and a vector (which will hold a path) i.e.: (10,[root,node1,node3,node5]) (the length of the path doesn'...
Hello i am developing a program in c#, and thanks to the matlab .net builder,
i am using a matlab maping toolbox fucntion "polybool", which in one of it's options calculate the diffrence of 2 polygons in 2-D.
The problem is that the fucntions takes about 0.01 seconds to finish in which is bad for me
because i call it a lot.
And this does...