답변 있음
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' )) ; ...

거의 13년 전 | 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...

거의 13년 전 | 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...

거의 13년 전 | 3

| 수락됨

답변 있음
Importing XYZ matrix into Matlab
*EDIT:* see my second solution for a more flexible approach. *=== 1st solution.* % - Read content. fid = fopen( 'my...

거의 13년 전 | 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...

거의 13년 전 | 1

| 수락됨

답변 있음
Create a new table based on cell array
Yes dataId = num2cell( 1:numel( cellarray )).' ; cData = [dataId, cellarray] ;

거의 13년 전 | 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(...

거의 13년 전 | 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...

거의 13년 전 | 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...

거의 13년 전 | 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...

거의 13년 전 | 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 ...

거의 13년 전 | 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 = ...

거의 13년 전 | 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...

거의 13년 전 | 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 ...

거의 13년 전 | 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 _...

거의 13년 전 | 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...

거의 13년 전 | 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...

거의 13년 전 | 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...

거의 13년 전 | 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>' ) ;

거의 13년 전 | 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....

거의 13년 전 | 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...

거의 13년 전 | 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...

거의 13년 전 | 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...

거의 13년 전 | 4

| 수락됨

답변 있음
find a specific file
You could use the following function: function fName_out = convertFilename( fName_in ) match = regexp( fName_in, '[\d_]...

거의 13년 전 | 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...

거의 13년 전 | 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...

거의 13년 전 | 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...

거의 13년 전 | 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 ...

거의 13년 전 | 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...

거의 13년 전 | 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...

거의 13년 전 | 1

더 보기