Answered
How to load many variables form base environment
_"goal is not to write nice matlab code, but instead structure it in the most convenient way"_ &nbsp How come you believe there ...

11 years ago | 1

| accepted

Answered
. I'm trying to find out some indices and process a file with rows (comented) with diferent numbers of columns. Any help?
* _"the indices of these last ones"_ &nbsp I'm not sure what _"indices"_ refers to. * _"I need to find out these indices becaus...

11 years ago | 0

| accepted

Answered
Importing line-by-line from a text file
Hint %% str = '35, 0401-BA1,1,6,8,00000,0,01,053,50530,''Channel '',,'; %% fmt = '%d%s%d%d%d%d%d%d%d%...

11 years ago | 0

| accepted

Answered
Matlab 2013a and Excel
Assumption: * the values in the top row are unique integers * the values in the leftest column are unique integers Hint...

11 years ago | 0

Answered
Problem trying to graph, getting error unbalanced
Works here after I replaced Class_YMod _Sample3 by Class_YMod_Sample3

11 years ago | 0

Answered
how to read data from a .mat file
Try S = load('Ey1a.mat'); and see help for load

11 years ago | 2

| accepted

Answered
Simplify regexprep to avoid having to use a loop
At least different %% for jj = 1:length(nodes) ix_ = find(nodes{jj}=='_'); if length(ix_) >= 3 ...

11 years ago | 0

| accepted

Answered
How to read txt file in matlab
See <http://se.mathworks.com/matlabcentral/answers/57276-import-data-file-with-comma-decimal-point#answer_69283 Import data file...

11 years ago | 1

Answered
passing multiple inputs to .exe via system or dos
My system don't want me to download *|solid.exe|*. I guess you are on Windows, since you mention *|dos|*. Furthermore, I gue...

11 years ago | 1

| accepted

Answered
How to search a string with multiple rows for text?
I guess this block of characters is easier to read on screen than to read and parse automatically. _"find the correct function"_...

11 years ago | 0

Answered
How to read 1st coloumn from excel sheet which contains 60x3 values.
The documentation on <http://se.mathworks.com/help/matlab/ref/xlsread.html xlsread, Read Microsoft Excel spreadsheet file> says ...

11 years ago | 0

Answered
How to find the index of the closest value to some number in 1D array ?
Hint: >> [ d, ix ] = min( abs( x-val ) ); >> x(ix-1:ix+1) ans = -1.0360 -1.0270 -1.0180 ix is the ...

11 years ago | 16

| accepted

Answered
Constructor not working, preallocating object leaves object with no properties
Works well here (R2013b) >> t = ameth([1:4]) t = 1x4 ameth array with properties: trk ...

11 years ago | 0

| accepted

Answered
Call file names one by one from an array
_"one name at a time"_ &nbsp Replace input_file=[d.name]; by input_file = d(i).name;

11 years ago | 0

| accepted

Answered
MultiLine Edit Boxes - Appending to
_"but in an appending manner"_ &nbsp No! (not before R2014b anyway) There are two alternatives * Keep and modify the entir...

11 years ago | 0

Answered
How i will choose a random element of a matrix
One way A = rand(3,4) A( randi([1,size(A,1)],1), randi([1,size(A,2)],1) )

11 years ago | 1

| accepted

Answered
Getting data from a struct array using dynamic field references
Replace data.(OECFMES(1)) by data.(OECFMES{1})

11 years ago | 0

| accepted

Answered
how to calculate digits after decimal point?
Another approach, which is based on *|sprintf|* and *|regexp|* nsg = significant( 1.2344500 ) nsg = significant( 1e-...

11 years ago | 0

Answered
i want to enter a matrix into a zero matrix except one row
B = A([1:5,7:11],:);

11 years ago | 1

| accepted

Answered
I want the number of rows that have bigger than 0 or 1
Is this what you look for length(find(max(A,[],2)>1)) ans = 3

11 years ago | 1

| accepted

Answered
Input complex matrix from txt file into matlab variable
Excerpt from <http://se.mathworks.com/help/matlab/ref/textscan.html textscan, Read formatted data from text file or string>: ...

11 years ago | 0

Answered
How to convert string with complex numbers to matrix
R2013b - Replacing *|1-i|* by *|1-1i|* makes it possible to read the string with textscan >> str = '5+6i 3-2i 1-1i @ 4+1i...

11 years ago | 2

Answered
How to extract data from a vector
This is close %% cac = { 'AB_00_CD_10_EF_80_GH_50' 'AB_01_CD_20_EF_100_GH_100' 'AB_02_CD_3...

11 years ago | 0

Answered
how to write a loop with variable limits
Hint: while condition == false if not(c>0) a = a + something; b = b + something...

11 years ago | 1

| accepted

Answered
how to implement OO design using structs?
*IIRC:* Before R2008a Matlab included support for OOP based on structs. See <http://se.mathworks.com/help/releases/R2007a/techdo...

11 years ago | 0

Answered
open text file constructed in a specified manner
I have answered similar questions a few times, e.g. * <http://se.mathworks.com/matlabcentral/answers/168639-how-to-delete-ro...

11 years ago | 0

Answered
How to combine numerical values into one?
_"I don't mind if the elements in c are strings."_ &nbsp The leading zero in *|01|* requires a string. Try >> sprintf( '...

11 years ago | 1

Answered
Iteration in the text(comment) part of an fprint loop
Replace fprintf('T(k)=\t%10.10s\t%10.10s...', HotTemp, ... by fprintf('T(%d)=\t%10.10s\t%10.10s...', k, HotTemp...

11 years ago | 0

| accepted

Answered
Modify then write data in the given format
The documentation of *|textscan|* doesn't cover fixed-width very well. However, *|textscan|* has "undocumented"/hidden capabilit...

11 years ago | 0

| accepted

Answered
use f=@(x) as an argument of a function.m
Replace New_Raph(@f1,@df1,0,0.1) by New_Raph(f,df1,0,0.1) *|f|* or *|f1|* - a typo? &nbsp *Add...

11 years ago | 1

| accepted

Load more