Answered
Is it possible to split a large text file into half and subsequently use textscan for both parts?
Something like this nRow = 50000; fid = fopen( ... ) buf1 = textscan( fid, ..., nRow, .... ); .... b...

13 years ago | 0

Answered
Matlab and batch file
I would do it this way cmd = sprintf( 'c:\\test.bat %s %s %s', file(:,1), file(:,2), file(:,3) ); msg = dos( cmd ); ...

13 years ago | 0

Answered
Assigning a single value to cell array with logical indexing.
_"... for what it does ..."_ * it creates a cell array of strings, AmpLimitField * it takes a cell array, VDIV, as input ...

13 years ago | 3

| accepted

Answered
Can "Enter " button in keyboard be replaced with some built-in function ?
See <http://undocumentedmatlab.com/blog/gui-automation-robot/ GUI automation using a Robot> at Undocumented Matlab.

13 years ago | 0

| accepted

Answered
How do I save all of the workspace variables except for a certain specified variable under a specified name?
Try save( filename, '-regexp', '^(?!(a|d)$).' ) the values of the arguments should be strings

13 years ago | 0

Answered
Reading txt file by character number defined columns
The gro file format is described at <http://manual.gromacs.org/current/online/gro.html Gromacs>. There is no best way to read gr...

13 years ago | 0

Answered
Is there a way to plot the name of a point on a figure when it is plotted?
The function text( x, y, string ) will do that.

13 years ago | 0

Answered
How to load and perform calculations on multiple .mat-files?
You could try something like struct_array_of_matfiles = transpose( dir( 'folder_in_question\*.mat' ) ); for sa = st...

13 years ago | 0

Answered
Matlab publish - sections inside loop
AFAIK: The string on the %%-row must be static. It cannot include the value of a string variable. A dynamic title might be p...

13 years ago | 0

Question


How to publish text and pictures in a loop
I want to make a simple catalog over screen clips, which I captured with the Windows 7 Snipping Tool. That's simple with a for-l...

13 years ago | 2 answers | 0

2

answers

Answered
Why is regexp including extra data?
Neither do I understand why. Regular expressions are tricky. Another approach: loop over all rows data = regexp(...

13 years ago | 2

| accepted

Answered
Using loop in strings for import
The number, e.g. 2012, must be converted to a string. Note the double back-slash, "\\" for ii = 2011:1:2013 [ n...

13 years ago | 0

| accepted

Answered
Coding GUI's-formatting
I assume your _"script files"_ define functions. _"I'm making sure everything is running properly before I throw the code int...

13 years ago | 0

Answered
Static class call via string variable
It's without |eval| foo = str2func( my_class_string ); obj = foo(); obj.MY_CONSTANT_PROPERTY ans = ...

13 years ago | 2

Answered
Cell contents assignment to a non-cell array object.
I assume * picaduradm returns a vector of doubles * picad is defined as a vector of doubles Your assignments violate ...

13 years ago | 0

| accepted

Answered
Publish: make comments appear in published document
Here R2012a,64bit,Windows7 produces the html-result, which you expect. The on-line help says: Section title without ce...

13 years ago | 0

| accepted

Answered
how to fix "Undefined variable "P2" or class "P2.TilknytMedarbejder""?
Your code works! Did you miss to create the object, myP2? >> myP2 = Projekt2( 4, 6 ); >> myP2.TilknytMedarbejder( 1,...

13 years ago | 0

| accepted

Answered
Time data import from Excel
_then I use *datestr* in order to convert the numbers in decimals Matlab gives me into proper time values_ does that mean som...

13 years ago | 0

Answered
Mapping a 8x8 matrix into colormap figure
Try help gray

13 years ago | 0

Answered
How can i correct the error in the code?
What is your intension? I guess q=[q(2*qk),(2*qk),(4*qk)]

13 years ago | 0

Answered
How to paste cell values from multiple excel sheets?
Try doc xlsread

13 years ago | 0

Answered
.mat file corrupt?
It works here (R2012a,64bit,Windows7) >> load('C:\Users\poi\Downloads\MOTNL.MAT') Warning: Updating objects saved wi...

13 years ago | 0

Answered
Unknown Matlab code meanings
See: <http://www.mathworks.se/help/matlab/ref/randstream.html RandStream>

13 years ago | 0

Answered
Writting to a .tx file
Writing or reading? Try fid = fopen('HighScoreTable.txt', 'r' ); with an "r" for reading. textscan does only read...

13 years ago | 0

Answered
how can I create a timer?
There is a class named *timer* in Matlab. See the on-line help. However, I guess you are looking for *timeout*. Search for <...

13 years ago | 1

Answered
Calculate the number of days in a year
Or one of %% y = 2002; datenum([y+1,1,1]) - datenum([y,1,1]) %% sum( eomday( y, [1:12] ) )

13 years ago | 0

Answered
How to get figure data into a variable from mouse click? (alternative to ginput?)
See "Data Cursor" in the on-line help.

13 years ago | 0

Answered
How can I fix the alignment
This does it fprintf('%8s\t\t%8s\t\t%8s\t\t%8s\n', 'alfa', 'x[mm]', 'P[bar]', 'V[l]' ) fprintf('%8.4f\t\t%8.4f\t\t%8...

13 years ago | 0

| accepted

Answered
How to send the axes of a GUI to a figure outside the GUI
Either something like H = findobj( 'Name', 'GUIFigureName','type','axes','-not','tag','legend' ); or H = f...

13 years ago | 0

Answered
Selection of row from a matrix
Post the question at Cody:). It's a little exercise with logicl indexing. >> A( any( diff( sort( A, 2 ), 1, 2 ) == 0...

13 years ago | 0

| accepted

Load more