Answered
Append a char vector to a subset of cells (whose indices are known) in cell array of character vectors
Your basic concept is correct, you just need to use indexing on the LHS as well as the RHS: mycell(calidx_rng) = strcat('cal_',...

7 years ago | 1

| accepted

Answered
To check Scalar or Not
The reason is likely because of the order you check the inputs with, e.g.: fix(month) && isscalar(month) %^^^^^^^^^ ...

7 years ago | 1

| accepted

Answered
Not able to use plot function
plot is not the problem, the problem is that you used the wrong division. Replace / with ./ https://www.mathworks.com/help/...

7 years ago | 1

| accepted

Answered
Implementing mathematical functions in Matlab
>> x = 1.2; >> y = exp(log(x)) y = 1.2000 >> sind(30).^2 + cosd(30).^2 ans = 1

7 years ago | 0

| accepted

Answered
Strange error with use of the function."diff"
"...since it does not seem to be obvious at all. " On multiple lines of form2 you define a variable named diff, like this: dif...

7 years ago | 0

| accepted

Answered
when i add 's' when writing a program for matrix in script then there is no space between the eelements of any row
Wrap input in str2double: MATRIX(r,c) = str2double(input('...','s'));

7 years ago | 1

| accepted

Answered
How can i do loops (for cycles) with struct?
"... a matrix composed by struct (it is 1x91 cells, each one is a struct 1x1) ..." What you describe sounds like a 1x91 cell ar...

7 years ago | 0

| accepted

Answered
"Not enough input arguments" error using add_line()
"...i don't understnd why" Read the error message! According to the add_line documentation you can supply these input argument...

7 years ago | 0

Answered
How to remove empty fields from a struct?
a.bt(cellfun('isempty',a.bt)) = []

7 years ago | 0

Answered
String matrix compare to get common in rows
>> A1 = {'AA', 'b' ; 'cc', 'ff' ; 'tt', 'kk'; 'XX', 'b'; 'AA', 'b'}; >> A2 = {'ee', 'AA' ; 'hhh', 'm'; 'kk', 'o'; 'ee', 'XX'; '...

7 years ago | 0

| accepted

Answered
How can I determine the indices and length of consecutive non-NaN values in an array?
1) >> A = [NaN NaN NaN 10 22 NaN 33 28 21 NaN 20 98 NaN]; >> find(~isnan(A)) ans = 4 5 7 8 9 11 12 o...

7 years ago | 3

Answered
random number between 0 and 1
>> V = [zeros(1,100),ones(1,312)]; >> V = V(randperm(numel(V))); Checking: >> nnz(V==0) ans = 100 >> nnz(V==1) ans = 312...

7 years ago | 0

| accepted

Answered
How to Call multiple Database files and store the variables in them separately using loops?
% Fake data: amx = 1; ff = 11; save('12c1.mat','amx','ff') amx = 2; ff = 22; save('12c2.mat','amx','ff') clear % Main ...

7 years ago | 0

Answered
How can I add a workspace variable that is generated in a loop?
https://www.mathworks.com/help/matlab/matlab_prog/string-evaluation.html https://www.mathworks.com/matlabcentral/answers/304528...

7 years ago | 1

Answered
Wildcard in variable name or changing variable names in loop
https://www.mathworks.com/help/matlab/matlab_prog/string-evaluation.html https://www.mathworks.com/matlabcentral/answers/304528...

7 years ago | 1

| accepted

Answered
calling matrix by its double value
https://www.mathworks.com/help/matlab/matlab_prog/string-evaluation.html https://www.mathworks.com/matlabcentral/answers/304528...

7 years ago | 0

| accepted

Answered
How to convert matrix into row vector
>> A = [0 1; 2 0]; >> B = reshape(A.',1,[]) % you need to use TRANSPOSE! B = 0 1 2 0

7 years ago | 3

| accepted

Answered
How to replace a part of string in a cell array with a string that changes?
>> D = regexprep(C,'^\d+,\d+(\d):\d+\.\d+','SD$1'); >> D{:} ans = SD1_SPEED_MEASURED_1_rpm ans = SD2_SPEED_MEASURED_1_rpm an...

7 years ago | 1

| accepted

Answered
How to loop through a set of variables Y1..Y100
"it will be nice if you can find a way to import the data in a better format." Of course, it is simpler and more efficient to l...

7 years ago | 1

| accepted

Answered
incrementing over the alphabet???
>> for c = 'a':'z', disp(c), end a b c d e f g h i j k l m n o p q r s t u v w x y z >>

7 years ago | 3

Answered
Reducing a cell array of tables to a single table
vertcat(resultCell{:}) https://www.mathworks.com/help/matlab/matlab_prog/comma-separated-lists.html https://www.mathworks.com/...

7 years ago | 1

| accepted

Answered
dynamic variable names in a loop
https://www.mathworks.com/help/matlab/matlab_prog/string-evaluation.html https://www.mathworks.com/matlabcentral/answers/304528...

7 years ago | 0

| accepted

Answered
change variable name in each loop
https://www.mathworks.com/help/matlab/matlab_prog/string-evaluation.html https://www.mathworks.com/matlabcentral/answers/304528...

7 years ago | 2

| accepted

Answered
Cycle through arrays in for loop
https://www.mathworks.com/help/matlab/matlab_prog/string-evaluation.html https://www.mathworks.com/matlabcentral/answers/304528...

7 years ago | 0

| accepted

Answered
How Can I Assign variable Name?
https://www.mathworks.com/help/matlab/matlab_prog/string-evaluation.html https://www.mathworks.com/matlabcentral/answers/304528...

7 years ago | 2

| accepted

Answered
Is there a way to create a new variable inside a while loop?
https://www.mathworks.com/help/matlab/matlab_prog/string-evaluation.html https://www.mathworks.com/matlabcentral/answers/304528...

7 years ago | 0

| accepted

Answered
How to add the recent value of a variable to the end of the name of another variable as a suffix?
https://www.mathworks.com/help/matlab/matlab_prog/string-evaluation.html https://www.mathworks.com/matlabcentral/answers/304528...

7 years ago | 0

| accepted

Answered
How to use the string of a variable as a new variable name?
https://www.mathworks.com/help/matlab/matlab_prog/string-evaluation.html https://www.mathworks.com/matlabcentral/answers/304528...

7 years ago | 1

Answered
When the enumeration of the Excel cell with the name: CalculationFree, I want to use this cell as a variable in Matlab:
https://www.mathworks.com/help/matlab/matlab_prog/string-evaluation.html https://www.mathworks.com/matlabcentral/answers/304528...

7 years ago | 0

Answered
Import multiple data files and assign to variables
You should load the files into a variable, such as into a cell array: C{k} = load(...); or into a non-scalar structure, which ...

7 years ago | 0

| accepted

Load more