Answered
Getting indices of all unique rows
Read the documentation on unique and note that there is a second and third output argument. Doc says: [C,ia,ic] = uni...

13 years ago | 0

| accepted

Question


Strange output from WHICH for class definition file in package
I encounter an intermittent problem with class definition files, which are in a package. The function WHICH returns the filespec...

13 years ago | 0 answers | 1

0

answers

Answered
Selective colouring of points in a matlab surface plot
That depends on the character of "certain criteria", CC. If CC depends only on Z it is possible with ... 'CDataMappi...

13 years ago | 0

Question


Does checkcode return the status of the "Message indicator box", i.e. red/orange/green ?
I search for an automatic way to find out if a file has a syntax error. That is, to find the same piece of information that the ...

13 years ago | 2 answers | 2

2

answers

Answered
extract same row from multiple matrices
Your matrix, M, is 50MB. Try M1 = M( :, [ 1 : 100 : 30000 ] );

13 years ago | 0

Answered
Remove the rows/columns with single values of a matrix
A start: %% B = [1 1 3 5 5 5 7 9 9 0.1 0.5 0.2 0.4 0.3 0.9 0.1 0.6 0...

13 years ago | 0

Answered
Incorect output from the "fileparts" function
Windows 7 help says: Which characters can't be used in a file name? You can't use any of the following characters in...

13 years ago | 0

Answered
How can I store large amounts of data from a text file into a mat file efficiently?
Doc on save says: _save(filename, *'-struct', structName*, fieldNames) stores *the fields of the specified scalar structure...

13 years ago | 0

| accepted

Answered
Simple array addition question
Hint: x = [ 1, 2 ]; x(end+1) = 3; or x = cat( 2, x, 3 );

13 years ago | 2

| accepted

Answered
properties and object oriented programming
See documentation on: * meta.class class describes MATLAB classes and * meta.class.fromName. Return meta.class object associ...

13 years ago | 0

Answered
Calling multiple cell elements at once
Not with plain indexing. This one-liner does it r = cellfun( @(v) v(1), A ) However, ...

13 years ago | 1

Answered
How to select figure by name?
Hint: fh = findobj( 'Type', 'Figure', 'Name', 'the_name_of_the_figure' );

13 years ago | 1

| accepted

Answered
How I set a string in edit field when string is longer than the field itself
I assume you refer to an uicontrol of style: edit, text or listbox. Idea: store the full string in UserData and truncate befo...

13 years ago | 0

| accepted

Answered
What commands do I need to convert Matlab time to normal time when exporting files to excel
See <http://www.mathworks.se/matlabcentral/answers/47157-how-to-convert-numerical-dates-to-conventional-dates How to convert num...

13 years ago | 0

Answered
Convert Serial numbers to conventional date
NetCDF files are supposed to be self-documented. Is it "serial _*hour*_ numbers"? >> datestr( 17067072, 31 ) an...

13 years ago | 3

Answered
Reading data from a large text file into matrix
This code reads the second and third lines >> cac = cssm() cac = [2x1 char] [2x6 char] [2x1 uint32] [2...

13 years ago | 0

Answered
averaging over a timeseries
This example might help you find a solution to your specific problem, i.e. "I don't know how to calculate an hourly average from...

13 years ago | 1

Answered
How to create a graph
My approach, which requires some work, * put data in a 2D array, C * plot with the function, image * Image type: Indexed (...

13 years ago | 0

| accepted

Answered
How to do indexing without moving to a new variable ?
AFAIK: It is not possible. Why do you need a single statement?

13 years ago | 0

Answered
Reading in ugly data files
* textscan is a good alternative for "... both strings and numerical data" * with textscan all data rows need to have the same ...

13 years ago | 0

Answered
Possible to use anonymous function as script function input?
See: * <http://www.deskeng.com/articles/aaafse.htm MATLAB's advanced language features empower scientific programmers.> * <...

13 years ago | 0

Answered
import multiple .dat files
Set dbstop if error and inspect the values of the variables at line 15

13 years ago | 0

| accepted

Answered
Nested Loop not working
*Problems with your code:* * nextRow() is not properly defined as a nested function but rather as a subfunction. As a consequ...

13 years ago | 2

| accepted

Answered
Error using urlread to get results from queries
Doc says: str = urlread(URL) where URL is a Matlab string. You need to enclose the text by apostrophes to make it a M...

13 years ago | 0

| accepted

Answered
Testing for the presence of a substring in a cell array of strings
Here is a construct without implicit casting of types is_xc = not( cellfun( @isempty, strfind( x, 'xc' ) ) ); and next...

13 years ago | 2

Answered
Parse a cell array of strings without looping
On possibility for your first step - if the file is not huge: %% str = { '122.8233,216.1323,671.8740' '122...

13 years ago | 0

Answered
Comparing data with numbers and text
One possibility: %% F1 = { '5012_X' '5012_Y' '5012_Z' '5012_RX' '5012_RY' '5012_RZ...

13 years ago | 0

Answered
Problem with writing a matrix into a text file
I run your code on R2012a, 64Bit, Win7. It works as expected. I see neither 3 nor 3030. * Open in Excel produced a 100 row sh...

13 years ago | 0

Load more