Answered
How to verify input only contains certain numbers?
An idea >> b={'37', '36', '35'}; >> all( strcmp( unique( b ), {'35','36','37'} ) ) ans = 1 However, you h...

8 years ago | 0

| accepted

Answered
Get full path of directory that is on Matlab search path
One way >> s = what('InUse'); >> s.path ans = h:\m\FEX\InUse where *|InUse|* is a folder on my Matlab path

8 years ago | 2

| accepted

Solved


Space Saver
Remove all characters that are below a space in ASCII value.

8 years ago

Answered
How to read file with complex number as well as real numbers
If _"huge"_ is a fraction of the size of the memory: %% str = fileread( 'try_file.txt' ); ixc = find( str=='(', 1, 'f...

8 years ago | 1

| accepted

Answered
Read data from file
Two variants %% fid = fopen( 'cssm.txt' ); cac = textscan( fid, '(%d,%d) (%d,%d)', 'Whitespace','' ... ...

8 years ago | 0

| accepted

Submitted


A Notepad++ function list for MATLAB
Displays Methods and Functions of an m-file in a Tree View Control in the Notepad++ IDE

8 years ago | 2 downloads |

5.0 / 5
Thumbnail

Answered
how to import CSV file (problem with wrong written file)
I've done an experiment with regular expression on R2016a. I encountered a problem. (?m), 'lineanchors' doesn't work as document...

8 years ago | 1

Answered
I'm trying to import a data set into Matlab without success. See attached file.
One way %% ffs = 'june 12th Crypto datatofidgetwithonmatlab.csv'; %% fid = fopen( ffs, 'r' ); fmt = [ '"', repm...

8 years ago | 0

Answered
How to write a mixed data (text and number) in a CSV file ?
%% matrix1 = {'water';'space';'fire'}; matrix2 = [100;200;300]; %% fid = fopen( 'matrix.csv', 'w' ); for jj = 1...

8 years ago | 3

Answered
Import csv file with date and time in AM/PM format
Try this format >> str = 3/13/2017 11:20:00 PM >> cac = textscan( str, '%{MM/dd/yyyy hh:mm:ss a}D', 'Delimiter',',', ...

9 years ago | 0

| accepted

Answered
How can I make matlab editor wrap long comments?
It works for me on R2016a. The wrapping of comment lines are controlled by Preferences > Editor/Debugger > Language > Com...

9 years ago | 6

Answered
Parsing a file with comments and several blocks
_"... a RE that will parse each block into a header row and data ..."_ &nbsp %% str = fileread( 'cssm.txt'); % cssm.t...

9 years ago | 0

| accepted

Answered
How to extract a column from cell arrays matrix?
One way >> cellfun( @(a) a(1,1), out ) ans = 0.9572 0.0357 0.7060 0.0344 0.7094 however, a for-loo...

9 years ago | 3

| accepted

Answered
How to plot two y-axes on the same graph in Matlab
See * <http://uk.mathworks.com/help/matlab/ref/yyaxis.html yyaxis, Create chart with two y-axes> (Introduced in R2016a). * <...

9 years ago | 4

| accepted

Answered
Merging Columns multiple columns to form date in 'YYYY-MM-DD_HH:MM:SS' format.
The length of a date vector must be three or six %% C = [2014 6 3 1 2014 6 3 2 2014 6 3 3 ]; %% C...

9 years ago | 0

| accepted

Answered
How to read a txt file with values and strings?
Replace A = fscanf('changing.txt','%8.1f %8.4f %8.1f %8.1f %s\r\n'); by %% fid = fopen( 'changing.txt', 'r' ); ...

9 years ago | 0

| accepted

Answered
Toolbox Problems: some functions missing
*|interpolateSolution|* &nbsp is obviously a method of three different classes <</matlabcentral/answers/uploaded_files/72346/...

9 years ago | 1

| accepted

Answered
storing script outputs as an array
I guess: this is what you try to do. %% D = nan( 1, 2000 ); format('long') %imagine points in 2-dimensional eu...

9 years ago | 0

Question


Error in debug mode: Method not defined or removed from search path.
I recently updated from R2013a to R2016a and now my way of experimenting in debug-mode causes an error, which I cannot remember ...

9 years ago | 2 answers | 0

2

answers

Solved


Create a figure and plot data
Given two data vectors (x,y), open a new figure and plot the data. Return the figure handle.

9 years ago

Answered
How to import columns of complex numbers to Matlab variables from CSV file?
*|textscan|* (and *|readtable|*) reads complex numbers. Valid form for a complex number is: &nbsp ±<real>±<imag>i|j. Example: *|...

9 years ago | 1

Answered
How do I create an array containing the names of all the variables in a Workspace and then use this array to run a function/script on all the variables?
I guess you got the message. (I might delete this answer.) Try this, which is a solution if you painted yourself into a corner. ...

9 years ago | 0

Answered
Reading and processing data from text file to matlab variable quickly
_"Reading and processing data from text file to matlab variable *quickly*"_ &nbsp The short answer is that using *|textscan|* to...

9 years ago | 1

| accepted

Question


Does justifiable use of EVAL exist?
Here at Matlab Answers we often answer and discuss questions related to dynamic names of variables and EVAL, here short for the ...

9 years ago | 2 answers | 1

2

answers

Answered
Badly formed format string error using textscan
Remove the ending "%" >> data=textscan('146.557,Yes,Yes,Yes,OE','%f%s%s%s%s','Delimiter',','); >> data data = ...

9 years ago | 0

Answered
Read mat files from a custom function
Try this %% file_list = reshape( dir('Day*.mat'), 1,[] ); %% for saf = file_list dh = sscanf( saf.name, 'Day...

9 years ago | 0

| accepted

Answered
Replace "-" with "E-" in output file
This does it >> regexprep( '1.7865271465-119', '([\d\.]+)\-(\d+)', '$1E-$2' ) ans = 1.7865271465E-119 But it doesn...

9 years ago | 0

| accepted

Answered
Dynamic variable names for full workspace operations
There are good reasons to avoid *|eval|* (Here, I use *|eval|* as shorthand for *|eval|*, *|evalin|* and *|assignin|*), see *...

9 years ago | 1

| accepted

Answered
How to read only some lines and skip others
>> cssm('cssm.txt') ans = 0 -69.1127 -68.9000 -65.2096 0.0270 -69.1062 -68.8937 -65.2083 ...

9 years ago | 0

| accepted

Question


What's required of an automatic UML Class Diagrams tool to be useful?
Updated version of m2uml on File Exchange:&nbsp <http://uk.mathworks.com/matlabcentral/fileexchange/59722-m2uml/content/html/m2u...

9 years ago | 1 answer | 0

1

answer

Load more