回答済み
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年以上 前 | 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年以上 前 | 2

| 採用済み

解決済み


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

9年以上 前

回答済み
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年以上 前 | 1

| 採用済み

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

9年以上 前 | 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年以上 前 | ダウンロード 883 件 |

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年以上 前 | 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年以上 前 | 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年以上 前 | 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年以上 前 | 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年以上 前 | 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年以上 前 | 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年以上 前 | 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年以上 前 | 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年以上 前 | 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年以上 前 | 0

| 採用済み

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

9年以上 前 | 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年以上 前 | 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年以上 前 | 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年以上 前

回答済み
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年以上 前 | 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. ...

9年以上 前 | 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...

9年以上 前 | 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 ...

9年以上 前 | 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年弱 前 | 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年弱 前 | 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年弱 前 | 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年弱 前 | 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年弱 前 | 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年弱 前 | 1 件の回答 | 0

1

回答

さらに読み込む