can matlab2tikz convert bubblecharts to tikzpicture? does not work for me - matlab

There is no \addplot section in the resulting .tex file.
That said, can matlab2tikz convert bubblecharts to tikz?

Related

Latex changes fonts in Matlab produced eps files

In short:
I produce a figure in matlab (2013a). The problem lies with the "fontname" command. Example code is
plot([1:10],[1:10])
set(gca, 'XTick',[0,4,8])
set(gca, 'XTicklabel',{'p/2','3p/2','2p'},'fontname','symbol');
Prints it with print -despc "filename".
Include it in a latex file with includegraphics command and epstopdf
The fonts in the figure are distorted, while they are intact the eps file itself. For example, in the latex file, the pi labels are turned into not-equal signs.
Do you know why does this happen?
Remark: I have to use "fontname" command because, at least for Matlab 2013a, latex interpreter can not be applied for the XTickLabel.

Matlab how to open file in excel put into array and convert numbers to units of measurement

I have an excel file to open matlab and put into an array of cells - then take the numbers in the cells and convert a few measurements. how do i do this
I'd suggest looking into the two functions xlsread and xlswrite These both handle input (from an .xls or .xlsx) file to matlab and output from matlab to an excel file, respectively. If you're looking to do something different than that, please elaborate a bit more than what you've posted.

How can I control the formatting when saving a matrix to a file?

I save a matrix to a file like this:
save(filepath, 'mtrx', '-ascii');
Is there a way to tell MATLAB to write 0 instead of 0.0000000e+000 values? It would be nice because it would be faster and easier to see which values differ from zero.
I suggest using DLMWRITE instead of SAVE since you're dealing with ASCII files. It will give you more control over the formatting. For example, you could create an output file delimited by spaces with a field width of 10 and 6 digits after the decimal point (see more about format specifiers here):
dlmwrite(filepath,mtrx,'delimiter',' ','precision','%10.6g');

display the output from mat file

Please, any one help me: how can I display the output (image file name, mean color image, color histogarm) to see it, which I saved it in sruct of array in mat file
You can load mat files (MatLAB) formats in the free software GNU Octave.
Loading it would give you a new variable, let's say a
After you loaded it, you can display it according to the structure using octave commands.
GNU octave can be downloaded here: http://www.gnu.org/software/octave/download.html
Example hist(a)

Text and Plots in Matlab to LaTeX

I like to create a "report generation" script in Matlab.
Suppose we have a Matlab array, data and we want to export the following to a .tex file:
"The information in the first element of data is X." This would be followed by a plot of X.
I have already tried help latex in Matlab and aware of the various packages on Matlab file exchange. However I have seen nothing so far that will allow me to export both text and plots in the same Matlab script to a .tex file.
The publish function may work for you.
Create this script, foo.m:
%%
% The information in the first element of data is X.
plot(X)
And publish it to LaTeX:
>> publish foo latex
You might want to take a look at this article published in TUGboat (the official magazine of the TeX Users Group):
http://www.tug.org/TUGboat/Articles/tb24-2/tb77seta.pdf
Generating LaTeX documents through Matlab (S. E. Talole and S. B. Phadke)
Good luck!
Are you aware of matlab2tikz? i've used it extensively for my PhD-Thesis, albeit only for exporting single plots. But I guess it should be easily possible to whip something up that combines the power of MATLABs LaTeX export capabilities.
Exporting figures from Matlab to a .tex file is just a matter of exporting the figure to an appropriate format and then including the figure file in the .tex file. Would something like the code listed below work for your needs?
Using LaTeX to generate dvi:
% Include code to write text to .tex file (fid is assumed to be the file id of the .tex file)
print(gcf,'figure1','-depsc','-r100');
fprintf(fid,'\includegraphics[width=4in]{figure1.eps}\n');
Using pdfTeX to generate pdf:
% Include code to write text to .tex file (fid is assumed to be the file id of the .tex file)
print(gcf,'figure1','-djpg','-r100');
fprintf(fid,'\\includegraphics[width=4in]{figure1.jpg}\n');