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

quasi 9 anni fa | 0

| accettato

Risposto
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

quasi 9 anni fa | 2

| accettato

Risolto


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

quasi 9 anni fa

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

quasi 9 anni fa | 1

| accettato

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

quasi 9 anni fa | 0

| accettato

Inviato


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

quasi 9 anni fa | 2 download |

5.0 / 5
Thumbnail

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

quasi 9 anni fa | 1

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

quasi 9 anni fa | 0

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

quasi 9 anni fa | 3

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

circa 9 anni fa | 0

| accettato

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

circa 9 anni fa | 6

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

circa 9 anni fa | 0

| accettato

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

circa 9 anni fa | 3

| accettato

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

circa 9 anni fa | 4

| accettato

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

circa 9 anni fa | 0

| accettato

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

circa 9 anni fa | 0

| accettato

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

circa 9 anni fa | 1

| accettato

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

circa 9 anni fa | 0

Domanda


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

circa 9 anni fa | 2 risposte | 0

2

risposte

Risolto


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

oltre 9 anni fa

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

oltre 9 anni fa | 1

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

oltre 9 anni fa | 0

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

oltre 9 anni fa | 1

| accettato

Domanda


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

oltre 9 anni fa | 2 risposte | 1

2

risposte

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

oltre 9 anni fa | 0

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

oltre 9 anni fa | 0

| accettato

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

oltre 9 anni fa | 0

| accettato

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

oltre 9 anni fa | 1

| accettato

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

oltre 9 anni fa | 0

| accettato

Domanda


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

oltre 9 anni fa | 1 risposta | 0

1

risposta

Carica altro