matlab

Using Matlab Google-Earth Toolbox to plot Latitude and Longitude

I am trying to plot some waypoints using the Google-Earth toolbox. The documentation for it is pretty poor, so I figured this would be a good Stack Overflow question. I have a matrix, wypts that has pairs of latitude and longitude coordinates in decimal format (If anyone is wondering this over the State College Airport (SCE) in Pennsylv...

How to include the general file name, taken as function argument in Matlab, in the path location?

BRIEF SUMMARY OF WHAT I WANT: If I take a file name as argument of a function, how do I include that file name in the path location such that the name of the file in the path location is the one user enters. If you didn't understand what I am saying, then read below for explanation: SECONDARY EXPLANATION: I am making a general functio...

Matlab's 'save' function - how to name the variable inside the .mat file same as file name?

I want to save the result of the q_yearly for each case_no in corresponding string of the q_cases_yearly as a .mat file. With my statement of save(q_cases_yearly{case_no},'q_yearly') even though the names of files are coming as the corresponding string of q_cases_yearly, however all those .mat files contain variable with the same name of...

How to make an AND operation on 2 numbers in MATLAB

Hey, I want to know how to perform an and operation on 2 numbers in MATLAB ex :- x = 31 '11111' ; y = 23 '10111' ; If I use the AND operation on this 2 numbers I will get z = x AND y z will be 23 due to AND operation How can I do this in MATLAB ? ...

ESRI's shapefile to Matlab

I am looking for a function to read/write points, lines and polygons from ESRI's shapefile format (as used in Arcview) for use in Matlab ...

Model in the loop testing of C code in Matlab/Simulink

I make a distributed embedded application that will make use of several micro-controllers. The unit under control is a mechanical unit that I do not have, but I have a Simulink model of it. What are the possibilities to perform Model-in-the-loop testing of existing C code with minimum modification of it? ...

I am trying to rearrange sections of a picture in matlab

here is the assignment: Open humpty_mixed.gif (2D image) and do what all of the king’s horses and men could not do – put humpty back together again. The image is 600x412 and split evenly along the row and columns. (Note: We may use the imread(), imshow(), and imwrite() commands here.) the picture is sectioned off in 4 rows and 4 colum...

Select a different base for a logarithmic plot in matlab

I want to have the x-axis logarithmic to the base 2: From 2^10 to 2^25 and at each step the exponent should increase by one, while the y-axis should be linear. How is this possible? I already figured out set(gca,'XScale','log') but u can't set the base. ...

Matlab - how to replace all the special characters in a vector?

Hi, Is it possible to replace all the special characters in a matlab vector through a regular expression? Thank you *EDIT: * Thank you for your responses. I'm trying to achieve the following. I have a text file that contains few paragraphs from a novel. I have read this file into a vector. fileText = ['Token1,' 'token_2' 'token%!3'...

Matlab- How does you name a new variable based on other variables' values?

I want to name a variable using values of other variables given in a function. So, if I have values for an x1,x2 I can make the new variable's name as: x_(x1's value)_(x2's value) as a name. I've checked out the eval, num2str, strcat functions, but as of yet I can't make it so that I have a variable with the name above which I can assi...

Connecting to MongoDB from MATLAB

I'm trying to use MongoDB with MATLAB. Although there is no supported driver for MATLAB, there is one for Java. Fortunately I was able to use it to connect to db, etc. I downloaded the latest (2.1) version of jar-file and install it with JAVAADDPATH. Then I tried to follow the Java tutorial. Here is the code javaaddpath('c:\MATLAB\myJ...

How to extract Y,U, and V components from a given yuv file using Matlab? Each component is used for further pixels level manipulation.

Hey guys. I'm currently playing with YUV file. Do you have any suggestion on how to extract y,u,v components from a yuv video? I found a piece of program which was shown below. But I don't know which part is the valid components that I want. Thanks. % function mov = loadFileYuv(fileName, width, height, idxFrame) function [mov,imgRgb] =...

How do I obtain the height and width of a given YUV video clip under Matlab? Is there any reader() function or get() function? Anything else?

How to get the width and height of a given yuv file? The dimensions are needed for subsequent movie/matrix processing. Thank you. ...

Matlab variable type help

How to convert variable of 'struct' type to a matrix in Matlab? How do we convert the q_yearly_w, in the code below, which is of type 'struct' to a matrix with which we can perform normal mathematical operations? %# open the file fid = fopen(Reportq_rwo); %# read it into one big array, row by row fileContents = textscan(fid,'%s','Deli...

Graph mining matlab

Hi guys, I have written some matlab code for image analysis that searches for clusters in an image and that builds an adjacency matrix for those clusters, discribing which clusters are touiching eachother in the image. I can use this adjacency matrix to derive a graph. For completion of my algorithm I would now have to mine that graph...

how to convert from matlab file to dll

I am using matlab 2009 -- I have .m file. I want to convert it to dll file so i can use it in c++. how can I do that, someone told me to use the matlab compiler and is it free? ...

How to avoid manual entering of input file, when .exe file is run from Matlab?

I am using a trans.exe file, which when run asks for a parameter (=input) file. If I run trans.exe using Matlab, then how can I directly give the parameter file inside the program without being prompted by Matlab to type it manually each time trans.exe is run? ...

Can anybody explain about Movie function and cdata in MATLAB?

Hi. I'm trying to figure out how to use cdata under Movie function in MATLAB. Can any expert please give me a short explanation? Thank you! ...

MATLAB publish, formatting LaTeX output header

I have thousands of lines of MATLAB ranging over several scripts that I have commented and broken up into cells. I would now like to publish. I have some universal formatting that I would like to apply. I would also like to be able to publish each script independently. At the moment I have written all these formats into a file called 'Fo...

Alternative of Matlab's Neural Network Toolbox in R

Is there a kind of package in R for this? Is the "AMORE" package a possible surrogate for Matlab's Neural Network Toolbox? Thanks. ...