matlab

How Matlab calculates the camera view angle?

I am using matlab to visualise a scene. In order to zoom in the scene, I can do that by eather: - Fix the cameraposition and the cameratarget and change the cameraviewangle.or - Fix the cameratarget and the cameraview angle and moving the camera along the viewing line (defined by the cameraPosition and the cameraTarget). I know how to ...

Quick Question: How to define empty character array in matlab?

for i=1:POPULATION_SIZE for j=1:NO_PARAMETERS c=dec2bin(parameters(j),NO_BITS_PARAMETER); chromosomes(i) = [chromosomes(i) c]; end end above code is giving the following error: ??? Undefined function or method 'chromosomes' for input arguments of type 'double'. I need an empty array of characters named chr...

Out of memory error while using clusterdata in MATLAB

Hi, I am trying to cluster a Matrix (size: 20057x2).: T = clusterdata(X,cutoff); but I get this error: ??? Error using ==> pdistmex Out of memory. Type HELP MEMORY for your options. Error in ==> pdist at 211 Y = pdistmex(X',dist,additionalArg); Error in ==> linkage at 139 Z = linkagemex(Y,method,pdistArg); Error in ==>...

Using MATLAB's plotting features as an interactive part of a Fortran program

Although many of you will have a decent idea of what I'm aiming at, just from reading the title -- allow me a simple introduction still. I have a Fortran program - it consists of a program, some internal subroutines, 7 modules with its own procedures, and ... uhmm, that's it. Without going into much detail, for I don't think it's neces...

how to make Sliding window model for data stream mining?

we have a situation that a stream (data from sensor or click stream data at server) is coming with sliding window algorithm we have to store the last (say) 500 samples of data in memory. These samples are then used to create histograms, aggregations & capture information about anomalies in the input data stream. please tell me how to ma...

tracking an image in matlab

How do you for example put a blue circle centered over an image you are tracking? Not a filled in circle, but more like a donut. ...

Simplifying a four-dimensional rule table in Matlab: addressing rows and columns of each dimension

Hi all. I'm currently trying to automatically generate a set of fuzzy rules for a set of observations which contain four values for each observation, where each observation will correspond to a state (a good example is with Fisher's Iris Data). In Matlab I am creating a four dimensional rule table where a single cell (a,b,c,d) will con...

image analysis question for matlab

Possible Duplicate: tracking an image in matlab Hi, I asked a similar question but wasn't quite clear before. I am trying to put a blue or an orange or some other colored circle (more like a donut) around a feature in an image so that I can track it. It should be more like a donut so that I can still view the image... Anyway, ...

Distributing a function over a single dimension of an array in MATLAB?

I often find myself wanting to collapse an n-dimensional matrix across one dimension using a custom function, and can't figure out if there is a concise incantation I can use to do this. For example, when parsing an image, I often want to do something like this. (Note! Illustrative example only. I know about rgb2gray for this specific c...

Problem drawing a polygon on data clusters in MATLAB

Hi, I have some data points which I have devided into them into some clusters with some clustering algorithms as the picture below:(it might takes some time for the image to appear) Each color represents different cluster. I have to draw polygons around each cluster. I use convhull for this reason. But as you can see the polygon for t...

Computing, storing, and retrieving values to and from an N-Dimensional matrix

This question is probably quite different from what you are used to reading here - I hope it can provide a fun challenge. Essentially I have an algorithm that uses 5(or more) variables to compute a single value, called outcome. Now I have to implement this algorithm on an embedded device which has no memory limitations, but has very ha...

For loops in Matlab

I run through a for loop, each time extracting certain elements of an array, say element1, element2, etc. How do I then pool all of the elements I've extracted together so that I have a list of them? ...

Grayscale in matlab

I'm trying to convert a 2D array to grayscale but using mat2gray doesn't do anything and imshow() appears to create a binary image that when I graph I cannot rotate it, e.g. the original array is 2d but maps in 3d. So, what is the best way to take a grayscale of 2d array in Matlab so if you have A=rand(5,10) or something and want to take...

Adding a vector of numbers from MATLAB to a list in C#

Hi, Could anyone suggest a straightforward way to take a vector of numbers from MATLAB and add those numbers to a list in C# to be called upon by an event in the C# program? I've found a lot of information on the interface between the two languages, but I'm very new to c# and could use the specificity. Any suggestions welcome! ...

subplots in MatLab

I use a loop to generate different images that I then collect into a figure with each image as a subplot. I do this for several different iterations of the loop and set the background for each figure to be a certain color, say red as in the example below - which works fine except the last iteration still has a default gray color - how do...

Problem with loop MATLAB

no time scores 1 10 123 2 11 22 3 12 22 4 50 55 5 60 22 6 70 66 . . . . . . n n n Above a the content of my txt file (thousand of lines). 1st column - number of samples 2nd column - time (from beginning to end ->accumulated) 3rd column - scores I wanted to create a new file...

Python: Mat-File into hex-values

filename = r"C:\Dokumente und Einstellungen\sschnei1\Desktop\a.mat" print open(filename, "r").read().encode("hex") The code above only work for text files. But I want to read out the hex-values of mat-files. EDIT: my little hex-editor from textwrap import fill filename = r"C:\a.mat" hexvalues = open(filename, "rb").read().encode("hex...

taking continuous input in MATLAB

i want to take data from bluetooth into matlab after every 10 to 15 seconds.. have figured out a way to transfer data to matlab via bluetooth. the problem i am facing is that i want matlab to execute a set of commands after a time interval to take input from bluetooth. if u cld plz help in this matter?? ...

fitting two dimensional curves in matlab

There's a toolbox function for the curve fitting toolbox called cftool that lets you fit curves to 1-d data. Is there anything for 2-d data? ...

MATLAB - Index exceeds matrix dimensions

Hi I have problem with matrix.. I have many .txt files with different number of rows but have the same number of column (1 column) e.g. s1.txt = 1234 rows s2.txt = 1200 rows s2.txt = 1100 rows I wanted to combine the three files. Since its have different rows .. when I write it to a new file I got this error = Index exceed...