已回答
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...

9 years 前 | 0

| 已接受

已回答
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

9 years 前 | 2

| 已接受

已解决


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

9 years 前

已回答
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...

9 years 前 | 1

| 已接受

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

9 years 前 | 0

| 已接受

已提交


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

9 years 前 | 885 次下载 |

5.0 / 5
Thumbnail

已回答
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...

9 years 前 | 1

已回答
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...

9 years 前 | 0

已回答
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...

9 years 前 | 3

已回答
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 前 | 0

| 已接受

已回答
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 前 | 6

已回答
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 前 | 0

| 已接受

已回答
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 前 | 3

| 已接受

已回答
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 前 | 4

| 已接受

已回答
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 前 | 0

| 已接受

已回答
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 前 | 0

| 已接受

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

9 years 前 | 1

| 已接受

已回答
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 前 | 0

提问


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 前 | 2 个回答 | 0

2

个回答

已解决


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 前

已回答
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 前 | 1

已回答
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. ...

10 years 前 | 0

已回答
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...

10 years 前 | 1

| 已接受

提问


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 ...

10 years 前 | 2 个回答 | 1

2

个回答

已回答
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 = ...

10 years 前 | 0

已回答
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...

10 years 前 | 0

| 已接受

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

10 years 前 | 0

| 已接受

已回答
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 *...

10 years 前 | 1

| 已接受

已回答
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 ...

10 years 前 | 0

| 已接受

提问


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...

10 years 前 | 1 个回答 | 0

1

个回答

加载更多