回答済み
Writing X Y values from char to a txt file
If your char class variable is named |str|: fid = fopen( 'myFile.txt', 'w' ) ; fprintf( fid, strrep( str, ';', '\n' )) ; ...

12年以上 前 | 1

回答済み
Primer Book for Matlab
You should be able to get it as PDF from <http://www.mathworks.com/help/releases/R2013b/pdf_doc/matlab/index.html here>. For the...

12年以上 前 | 1

回答済み
Shadowing built-in functions
I am not using packages either (yet), but I would love to have an alternate version of ADDPATH which would mount folders as pack...

12年以上 前 | 3

| 採用済み

回答済み
Importing XYZ matrix into Matlab
*EDIT:* see my second solution for a more flexible approach. *=== 1st solution.* % - Read content. fid = fopen( 'my...

12年以上 前 | 2

| 採用済み

回答済み
create one cell in excel after one iteration
What are you trying to achieve with the line? Kapitalwert(1,1)=num2cell('ZFW%d', i); Type doc num2cell you'll see...

12年以上 前 | 1

| 採用済み

回答済み
Create a new table based on cell array
Yes dataId = num2cell( 1:numel( cellarray )).' ; cData = [dataId, cellarray] ;

12年以上 前 | 0

| 採用済み

回答済み
Regular Expression to detect spaces in a string
Here is an example assuming that you want characters between |"| and |&lt;/a&gt;| and not only white spaces: >> s = regexp(...

12年以上 前 | 3

回答済み
how to read a text file and read it line by line?
If the string defining the composite number is stored in a variable named |theNumber|: count = numel( strfind( fileread('num...

12年以上 前 | 3

回答済み
Trouble with While and If loops
You have to think again about the condition in the WHILE statement or about the increments that you are using. To see why, assum...

12年以上 前 | 1

| 採用済み

回答済み
to which command refers ~isempty() to?
|ZoneElementProtNameUnder| is a 2D cell array. |ZoneElementProtNameUnder{1,1}| is the content of cell on column 1 and row 1 (c...

12年以上 前 | 2

| 採用済み

回答済み
Matlab. Find the indices of a cell array of strings with characters all contained in a given string (without repetition)
Here is another solution, for the fun of it .. >> spectrum = @(s) accumarray(s.'-64, ones(size(s)), [58,1]) ; >> str_spec ...

12年以上 前 | 3

回答済み
Please explain how to understand special strings like '^(\w:)?\'
*1.* Look at the following: % Windows type of absolute path. >> fullfile( 'C:\Temp', 'C:\Temp\myFile.txt' ) ans = ...

12年以上 前 | 1

| 採用済み

回答済み
fundamental principle of multiplication
I guess that the following would work. I didn't think too much about it though and there must be a simpler or even trivial solut...

12年以上 前 | 0

回答済み
Why subclass & superclass in OOP?
I am not sure that the room should be a super class for the desk actually, in the sense that the desk is not a specific type of ...

12年以上 前 | 19

| 採用済み

回答済み
How to write into txt file
If fopen cannot open the file, fileID is -1. Valid file IDs are generally above 2 for files that you open by yourself (1 being _...

12年以上 前 | 1

回答済み
Could someone explain how this code works?
The line temp = 0 ; is useless, and the |temp| which appear afterwards should be |f|, the output argument. Hint: cons...

12年以上 前 | 1

| 採用済み

回答済み
Is there a reverse buffer function?
If you always have these parameters, I guess that a solution is y = x(1:10,2:end) + x(11:20,1:end-1) ; y =[y(:); x(11:20,e...

12年以上 前 | 2

| 採用済み

回答済み
Detect edge and remove it
% - Read RGB image and convert to BW. BW = im2bw( imread( 'TEST_7.jpg' )) ; % - Build vectors of logicals targeting all...

12年以上 前 | 2

| 採用済み

回答済み
Regular Expression to append a string in text file
Here is a simple and funny solution: txt = regexprep( fileread('Text_File.txt'), '([^\n\r]+)', '<s>$1</s>' ) ;

12年以上 前 | 1

| 採用済み

回答済み
What's the best way to read an ASCII/txt file containing a few lines of text and then the data I want to load into a matrix?
If you always have the same number of header lines, use TEXTSCAN and set the parameter |'HeaderLines'| to a relevant value, e.g....

12年以上 前 | 2

| 採用済み

回答済み
matlab coding question help~
Convert T into a vector with correct dimension and ordering, and then work in a vector way (I removed the ';' at the end of each...

12年以上 前 | 2

回答済み
Find count of repeated letters (sequence)
Try to understand the following and fine-tune it to your needs: n = sum( diff([0, diff(a)==0]) == 1 ) In particular, eval...

12年以上 前 | 0

回答済み
Extracting data from from all rows aside from those that contain NaN?
select = ~isnan( A ) ; % Vector of logicals, true at location corresponding % to non-NaN...

12年以上 前 | 4

| 採用済み

回答済み
find a specific file
You could use the following function: function fName_out = convertFilename( fName_in ) match = regexp( fName_in, '[\d_]...

12年以上 前 | 1

| 採用済み

回答済み
Delete rows in a .txt table
Here is a solution assuming that my comment above under your question was correct. % - Define run parameters. fileLocat...

12年以上 前 | 0

| 採用済み

回答済み
find the smallest route
You can use a <https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm Dijkstra> or equivalent shortest path algorithm. The are sev...

12年以上 前 | 0

回答済み
??? Subscripted assignment dimension mismatch
First: doc interp1 and once you understand roughly what it does and its input parameters, I guess that you could modify y...

12年以上 前 | 1

| 採用済み

回答済み
Code and decode an entire struct to and from a plain string
What you are looking for is "MATLAB struct or object serialization" (on e.g. FEX or Google), but passing a serialized struct as ...

12年以上 前 | 3

| 採用済み

回答済み
How do I print a formatted matrix without using a loop?
fprintf( fid, '%f %f %f %f %f %f\n', m.' ) ; where |fig| is the file identifier returned by FOPEN (or 1 if you want to tes...

12年以上 前 | 0

回答済み
How can I determine if one class is superior or inferior to another?
You could use property SuperclassList from the output of METACLASS recursively .. Here is an example: function tf = isSub...

12年以上 前 | 1

さらに読み込む