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

casi 9 años hace | 0

| aceptada

Respondida
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

alrededor de 9 años hace | 2

| aceptada

Resuelto


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

alrededor de 9 años hace

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

alrededor de 9 años hace | 1

| aceptada

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

alrededor de 9 años hace | 0

| aceptada

Enviada


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

alrededor de 9 años hace | 2 descargas |

5.0 / 5
Thumbnail

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

alrededor de 9 años hace | 1

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

alrededor de 9 años hace | 0

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

alrededor de 9 años hace | 3

Respondida
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',',', ...

alrededor de 9 años hace | 0

| aceptada

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

alrededor de 9 años hace | 6

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

alrededor de 9 años hace | 0

| aceptada

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

alrededor de 9 años hace | 3

| aceptada

Respondida
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). * <...

alrededor de 9 años hace | 4

| aceptada

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

más de 9 años hace | 0

| aceptada

Respondida
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' ); ...

más de 9 años hace | 0

| aceptada

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

más de 9 años hace | 1

| aceptada

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

más de 9 años hace | 0

Pregunta


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

más de 9 años hace | 2 respuestas | 0

2

respuestas

Resuelto


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

más de 9 años hace

Respondida
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: *|...

más de 9 años hace | 1

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

más de 9 años hace | 0

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

más de 9 años hace | 1

| aceptada

Pregunta


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

más de 9 años hace | 2 respuestas | 1

2

respuestas

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

más de 9 años hace | 0

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

más de 9 años hace | 0

| aceptada

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

más de 9 años hace | 0

| aceptada

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

más de 9 años hace | 1

| aceptada

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

más de 9 años hace | 0

| aceptada

Pregunta


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

más de 9 años hace | 1 respuesta | 0

1

respuesta

Cargar más