Answered
For Lopp data acquiring
your_path = 'C:\Users\work\*.dat'; % your folder path finfo = dir(your_path); fnames = {finfo.name}'; for iCount = 1:...

8 years ago | 1

| accepted

Answered
how to use index in Simulink?
If the timestep is same as your simulink model, just create a two dimensional matrix in the workspace and it should work. You co...

8 years ago | 0

Answered
Find and read a value in an excel spreadsheet
Something like this? filename = 'myExample.xlsx'; sheet = 1; columnNames = {'A','B','C'}; rowNames = {'1','2','3'}...

8 years ago | 0

Answered
question about the textscan on a text file
Change |'headerlines'| count to *3* c = textscan ( fid, '%n %n %n %n','headerlines',3,'delimiter',',');

8 years ago | 0

| accepted

Answered
Naming sheets in exported xlsx file
You could change the sheet name using activex server, excel = actxserver('Excel.Application'); % # open Activex server ...

8 years ago | 0

| accepted

Answered
Error using randi Size inputs must be scalar issue.
ra​ndi(1,1,[x​_loc1(i)+1​,x_loc2(i)​-1]) This is not a valid syntax! <https://www.mathworks.com/help/matlab/ref/randi.ht...

8 years ago | 0

Answered
Loop Files from a Directory
Change datafilename =strcat('../Inputdata/URL2/',filenames(3)); to datafilename =fullfile('../Inputdata/URL2',filen...

8 years ago | 1

| accepted

Answered
How can i move an element of a vector 1 position to the right without change the left part
Do you mean this? >> A=[1,86,40,32,59,1] A = 1 86 40 32 59 1 >> A = [A(1:ceil(end...

8 years ago | 0

| accepted

Answered
Find file between others according to character
d = dir('*.mat'); your_str = 'c1'; fnames = {d.name}; f1 = cellfun(@(f) findstr(your_str,f),fnames,'UniformOutput',fa...

8 years ago | 0

Answered
How to draw a bar plot with different colors and several groups
<https://www.mathworks.com/matlabcentral/answers/310039-how-to-change-the-color-of-individual-bars-in-a-bar-chart>

8 years ago | 0

Answered
Add time column to matrix with measured values
m_time = datetime('1/1/2017 13:00:00'):seconds(0.5):datetime('1/2/2017 13:00:00'); T = table(m_time',temperature,humidity);...

8 years ago | 0

Answered
How to make Matrixes from the Data of an excel folder using the for loop ?
A = repmat(1:9,500,1); %your data 500x9 matrix AT = A.'; %transpose it AT_ND = reshape(AT,[3 3 500]); %make an ND array ...

8 years ago | 1

| accepted

Answered
I have a matrix of dimension 180x41 double. First column of the matrix is SubjectID, rest columns are four scores for 10 segments. I need to calculate mean of four scores for each part and store in one matrix. Please Help!
data = dlmread('MSE_cl_Fz.csv',',',1,2); ind_s = 1:4:size(data,2); ind_e = 4:4:size(data,2); for row_no = 1:size(data...

8 years ago | 1

| accepted

Answered
How to save multiple figures created by bar() in a loop with different name?
for iCount = 1:3 h = figure; bar(rand(iCount)) fname_fig = ['figure_' num2str(iCount) '_in_fig_format.fig...

8 years ago | 0

Answered
Add matrix to matrix
N = [B.' C.'; D.' E.']; F = A+N Why E has only 3 elements? I'd assume you missed out something there.

8 years ago | 0

Answered
Extract non zero term from Vector
<https://www.mathworks.com/help/matlab/ref/nonzeros.html nonzeros> - *EDITED* Use it in a Matlab function block?

8 years ago | 1

Answered
xlswrite to specific cells
If you put all the variables in one cell array, then maybe varCell = {a,b,c}; xlCell = {'A1','B3','C7'}; cellfun(@(v,...

8 years ago | 0

Answered
How to pull down a certain number of vectors from a list of sequential pull down numbers.
A = {1;2;3;} B = {'1a',2,3; '2a',3,4; '3a',5,6; '4a',7,8; '5a',9,10; '6a',11,12} indV...

8 years ago | 0

| accepted

Answered
How to I cumulatively add data to a matrix in a GUI using a push button?
A = []; %initialize then something like the following for your pushbutton callback function pushbutton_callback(sr...

8 years ago | 1

| accepted

Answered
I am having an issue concatenating two cell arrays.
vclass = {'100kV','150kV','600kV'}; YearQtr = {'2014 Q1','2014 Q2'}; [vclassM,YearQtrM] = meshgrid(vclass,YearQtr); v...

8 years ago | 0

| accepted

Answered
How to check data by years?
Assuming that you're working with tables, something like this might help, %create dummy data dt = datetime([2016 1 1...

8 years ago | 0

| accepted

Answered
Convert three array into one matrix.
n = 3; m = 5; A = rand(1,n) B = rand(1,m) Z = 10; res = [reshape(repmat(A,m,1),n*m,1) repmat(B',n,1) Z*ones(n*m...

8 years ago | 1

Answered
How do I remove ticks from one side of a graph, but keep them for the other?
<https://stackoverflow.com/questions/21913729/remove-tick-marks-on-second-y-axis-but-retain-box-on>

8 years ago | 0

| accepted

Answered
writing multiple 2D matrices in 1 excel file
sheetA = 1; sheetB = 2; xlswrite(filename,A,sheetA) xlswrite(filename,B,sheetB) %and so on

8 years ago | 0

| accepted

Answered
Autocomplete the datetime series
something like this? Try with a bigger dataset with occasional gaps. ts_ref = (datetime('01/01/1946 00:00:00'):hours(1):dat...

8 years ago | 0

| accepted

Answered
How to seperate serial data into separate columns
your_cell_array = {'21.0,12.232,43';'21.0,12.232,43';'21.0,12.232,43'} new_cell_array = regexp(your_cell_array, ',', 'split...

8 years ago | 0

| accepted

Answered
transfer from fix array to another array
M = repmat(w(1,:),N,1);

8 years ago | 0

| accepted

Load more