Community Profile

# Voss

Last seen: Today Active since 2013

Professional Interests:

All

#### Content Feed

View by

multiply a 1 by 500 matrix to a 688 by 550 matrix and want to get the result for iteration instead of final value from 1 by 500 matrix!
It's not clear to me whether "all the iterations" means to iterate over the first 5 elements of ait or to iterate over all eleme...

4 hours ago | 0

| accepted

How can i find the areas under single parts of a plot?
%Power P=[ 0.6495 0.7393 0.7551 0.7947 0.7974 0.8713 1.0482 1.2621 1.6027 1.7189 1.5710 1.3070 1.4416 1.5684 1.608 1....

7 hours ago | 0

Plot functions in a for cycle
You can move your plotting code inside the loops if you want to see a plot in each iteration, yes. I see that you're doing subp...

9 hours ago | 0

| accepted

how to generate a vector of binary code
Here you go: % a numeric vector of length 10, containing zeros and ones: [zeros(1,4) ones(1,6)] % a logical vector of length ...

11 hours ago | 0

Deleting the column with zero values and corresponding columns from another matrix
% (1) data setup: % 4 datasets (i.e., matrices) with 1044 rows and 55 columns: M1 = rand(1044,55); M2 = rand(1044,55); M3 ...

11 hours ago | 1

| accepted

Any idea on why a particular line of code is not read even in the debugging mode?
Checking whether x and y are each within some constant limits, like you have: if x >= p_x(1) && x <= p_x(2) && y >= p_y(1) && y...

11 hours ago | 1

| accepted

Creating time vector using number of samples
Defining t like this: t=0:1/2500:5000-1/2500 is creating a time vector that has samplerate=2500 [2500 samples/second, say] for...

12 hours ago | 0

how to generate a multiple if-else if statements for n times?
If all the if/elseif blocks have the same structure, which is this: if last_tol1 < 0.90 act_f = act_f + afl_inc1 elseif l...

21 hours ago | 0

How to label legend of plot
Something like this should work (using random data and using the second line from each plot call in the legend - adjust as neces...

1 day ago | 0

| accepted

Why do I recieve an error when trying to change the Line Width of a plot line?
The Name,Value pairs supported in plot from the Curve Fitting Toolbox (reference) are different than the Name,Value pairs suppor...

1 day ago | 0

| accepted

can't get sequential .exe execution to occur in matlab
Try removing this line (between the for loops): path=cell(1,num_sim); That line has the effect of resetting path to a cell arr...

1 day ago | 0

How do I label the bars in my histogram with the function "histogram" ?
% Create random data for the sake of the example data = 10*rand(1,100); % Draw the histogram and return histogram object h ...

1 day ago | 1

How to pass from pixel coordinates to real world coordinates?
unzip reticolato_centroids.zip load reticolato_centroids.mat x = -1600:3:1600; %real world coordinate y = -1200:3:1200; %re...

1 day ago | 0

| accepted

How to reorganization all image long z axis
files = dir('*.bmp'); full_file_names = fullfile({files.folder},{files.name}); [~,fn,~] = fileparts(full_file_names); z = s...

1 day ago | 0

How to include a new fixed string ('Name') on header and numerical variable (subsequent rows) in a new column, at the beggining, of a existing .csv file?
% show the contents of data.csv type data.csv % the IDs you want to include in the file: IDs = [1314; 1314]; % read the fi...

1 day ago | 0

Sequencing a matrix with two constant variables and two incremental variables
Like this? max_num = 10; % change max_num to 100 if you want N to go up to 100 A = reshape(ones(1,max_num-3).'+(0:max_num-3)...

2 days ago | 0

Importing multiple text files into MATLAB
The options you have available to you depend on the contents of your txt files, but one general option (i.e., will work regardle...

2 days ago | 0

how to padding array with zeros to limit rows (I can choose the limit)
AB=[1 6 2 7 3 8 4 9 5 10]; AB(21,:) = 0; % MATLAB fills the intervening rows with zeros disp(AB);

2 days ago | 1

How to plot a function on an existing plot
It seems to work ok. Here I'm using different data for the image because I don't have your txt files. % bandstructure.m (modifi...

2 days ago | 1

| accepted

Create a time array
val = [ ... '17-10-58_086'; ... '17-11-09_923'; ... ] dt = datetime(val,'InputFormat','HH-mm-ss_SSS') dt_diff =...

2 days ago | 0

Plot legend in a bar graph
Month = {'April'; 'May'; 'June'; 'July'; 'August'; 'September'; 'October'; 'November'; 'December';'January'; 'February'; 'March'...

3 days ago | 1

A = readtable('v1.csv') figure; plot(A{:,1},A{:,2},'-','LineWidth',1.5,'color',[30,129,176]/255); hold on; plot(A{:,1},A{:...

3 days ago | 1

| accepted

if-elseif-else statement take turns/used each of them in while loop, how to write properly?
Like this? i=0; while i <= 20 i = i+1; r = rem(i,3); if r == 1 disp('its first num') elseif r == ...

3 days ago | 1

| accepted

How to store data from a nested For loop
x = -500:500:500; % X range y = -500:500:500; % Y range "The" MATLAB way: [xx,yy] = meshgrid(x,y); xy_coord = [x...

3 days ago | 0

how to store value in variables of one column in cell array from another column in cell array?
% your V_table: V_table = table( ... {'Lser_B7Tx';'Lser_B7Rx';'QCsmd';'QLemb';'Lshu_B7';'fQ';'Cshu_B7';'QLsmd'}, ... ...

3 days ago | 1

| accepted

How to multiply scalar and matrix(i set her in ''uitable1'') in GUI?
Use the Data property of the uitable data = get(handles.uitable1,'Data') There's no telling (based on the code we can see) wha...

3 days ago | 0

| accepted

Spit an array when the value 0 occurs until the value 2
% an array time (6700x1) containing numbers from % -8 to 5 in ascending order: time = linspace(-8,5,6700).' % time_new based...

3 days ago | 1

| accepted

Last value of Moving Average in single command
Here's a way: A = rand(10,1); % original, for reference: B = movavg(A,'exponential',2); C = B(end) % single-line command...

3 days ago | 0

| accepted