Réponse apportée
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' )) ; ...

plus de 12 ans il y a | 1

Réponse apportée
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...

plus de 12 ans il y a | 1

Réponse apportée
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...

plus de 12 ans il y a | 3

| A accepté

Réponse apportée
Importing XYZ matrix into Matlab
*EDIT:* see my second solution for a more flexible approach. *=== 1st solution.* % - Read content. fid = fopen( 'my...

plus de 12 ans il y a | 2

| A accepté

Réponse apportée
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...

plus de 12 ans il y a | 1

| A accepté

Réponse apportée
Create a new table based on cell array
Yes dataId = num2cell( 1:numel( cellarray )).' ; cData = [dataId, cellarray] ;

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
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(...

plus de 12 ans il y a | 3

Réponse apportée
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...

plus de 12 ans il y a | 3

Réponse apportée
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...

plus de 12 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 12 ans il y a | 2

| A accepté

Réponse apportée
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 ...

plus de 12 ans il y a | 3

Réponse apportée
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 = ...

plus de 12 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 12 ans il y a | 0

Réponse apportée
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 ...

plus de 12 ans il y a | 19

| A accepté

Réponse apportée
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 _...

plus de 12 ans il y a | 1

Réponse apportée
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...

plus de 12 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 12 ans il y a | 2

| A accepté

Réponse apportée
Detect edge and remove it
% - Read RGB image and convert to BW. BW = im2bw( imread( 'TEST_7.jpg' )) ; % - Build vectors of logicals targeting all...

plus de 12 ans il y a | 2

| A accepté

Réponse apportée
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>' ) ;

plus de 12 ans il y a | 1

| A accepté

Réponse apportée
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....

plus de 12 ans il y a | 2

| A accepté

Réponse apportée
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...

plus de 12 ans il y a | 2

Réponse apportée
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...

plus de 12 ans il y a | 0

Réponse apportée
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...

plus de 12 ans il y a | 4

| A accepté

Réponse apportée
find a specific file
You could use the following function: function fName_out = convertFilename( fName_in ) match = regexp( fName_in, '[\d_]...

plus de 12 ans il y a | 1

| A accepté

Réponse apportée
Delete rows in a .txt table
Here is a solution assuming that my comment above under your question was correct. % - Define run parameters. fileLocat...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 12 ans il y a | 0

Réponse apportée
??? 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...

plus de 12 ans il y a | 1

| A accepté

Réponse apportée
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 ...

plus de 12 ans il y a | 3

| A accepté

Réponse apportée
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...

plus de 12 ans il y a | 0

Réponse apportée
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...

plus de 12 ans il y a | 1

Charger plus