Community Profile

photo

Voss


Last seen: Today Active since 2013

Professional Interests:

Statistics

All
  • MATLAB Central Treasure Hunt Finisher
  • Treasure Hunt Participant
  • Ace
  • Thankful Level 3
  • Commenter
  • Leader
  • 6 Month Streak
  • Revival Level 4
  • Knowledgeable Level 5
  • Promoter
  • Scholar
  • CUP Challenge Master

View badges

Content Feed

View by

Answered
Error - I am new to Matlab and I just need help to graph this data I am getting a strange error.
t is a vector, so you need to use element-wise operations with it, e.g., .* ./ .^ Also, the way you defined your for loop, k is...

5 hours ago | 0

Answered
Compact way to extract day and hour from a datetime / datestrings format ?
time_array = { ... '17-Jun-2017 0:00:00'; ... '17-Jun-2017 1:00:00'; ... '17-Jun-2017 2:00:00'; ... ... ...

5 hours ago | 0

Answered
Function not processing dat for each element in array
The n given to tempcorrect is a vector (of length 10000). When you use a vector (or matrix, or any array) in an if statement, th...

6 hours ago | 0

Answered
How do I turn string "C = A*B" to "data.C = data.A.*data.B " while the equation and variables may change?
Maybe this is worth a try: % example usage fix_formula("C=A*B") fix_formula("A=B+C/D") fix_formula("A=B^2-C") % running it ...

7 hours ago | 0

Answered
Storing output of function file in workspace
Have the ParameterEstimates function return whatever outputs you need. In this case, I made it return Cfit. Then assign the out...

7 hours ago | 0

Answered
Display values barh, YEndPoints/XEndPoints does not work
Maybe you can use X/YData instead of X/YEndPoints. Here it is with labels on all bars; you can adapt it to label only the first ...

8 hours ago | 0

Answered
How to plot surf for 3D images.
unzip('h.zip') h = dicomread('./h/h.dcm'); whos h h = squeeze(h); whos h figure(); surf(h(:,:,1)) title('First Slice') c...

8 hours ago | 0

Answered
How to set map limits on mapshow?
xlim / ylim seems to work here: % landAreas = readgeotable("landareas.shp"); %taken from MATLAB documentation...

8 hours ago | 0

Answered
Display header along with data in excel using GUI
A = [12.7 5.02 -98 63.9 0 -.2 56]; B = [2 3 4 5 6 7 8]; % c= transpose([A;B]); c = num2cell(transpose([A;B])); % make c...

1 day ago | 0

Answered
How to create a 3 diagonal matrix with blocks
N = 7; M = zeros(2*N,N+2); M( 1+(2*N+2)*(0:N-1) + reshape([0 1]+[0;1;2]*2*N,[],1) ) = 1; disp(M);

1 day ago | 0

| accepted

Answered
How to change x-axis with boxplot
Like this? X = randn(100,82); boxplot(X) xt = 20:20:80; set(gca,'XTick',xt,'XTickLabel',xt); Or like this? xt = 20:20:80; ...

1 day ago | 0

| accepted

Answered
Generate a circular array of gridpoints inside a given contour.
Here's a function that fills an aribitrary contour (i.e., not necessarily a single circle) with random points (i.e., not necessa...

1 day ago | 0

Answered
Generate a circular array of gridpoints inside a given contour.
r = 1; x = linspace(-r,r,100); y = linspace(-r,r,100).'; figure [~,h] = contour(x,y,x.^2+y.^2, ... 'LevelList',r, ......

1 day ago | 0

Answered
I have tried many different ways of plotting but it won't make a line graph can someone help me out?
Either: n = 100; for i = 1:n x = rand(); % ... % ... % plot(n,x); plot(i,x,'.'); ...

1 day ago | 0

Answered
How to store the strings in For loop in subsequent rows of an cell
% newstr = strjoin(w,";"); % instead of this newstr{i,1} = strjoin(w,";"); % do this

1 day ago | 0

| accepted

Answered
how can we construct different cells inside cell-array?
Perhaps a structure would be useful for storing that information: exp_info = struct( ... 'Date','2022.06.29', ... 'Na...

1 day ago | 0

| accepted

Answered
How to apply this for-loop containing '<', designed for a scalar array, to several scalar arrays in a cell array?
Wrap that loop in another loop: Cell = { rand(100,6); rand(100,6); rand(100,6); rand(100,6) }; for k = 1:numel(Cell) x ...

1 day ago | 1

Answered
How to draw Afghanistan Country flag?
imshow(imread('https://cdn.britannica.com/40/5340-004-B25ED5CF/Flag-Afghanistan.jpg'))

2 days ago | 0

Answered
count the # of rows of CSV files in a folder
your_folder = 'C:\path\to\folder'; files = dir(fullfile(your_folder,'*.csv')); fullFileNames = fullfile(your_folder,{files.n...

2 days ago | 0

| accepted

Answered
Axis rotation problem on the figure window
f = openfig('Axis_rotation_problem.fig'); figure(f) view([90 0]) camroll(90)

2 days ago | 0

| accepted

Answered
Importing data from specific columns of a data structure
T = readtable('data.txt') T(T.Date >= 20200101 & T.Date <= 20200103,:)

2 days ago | 0

| accepted

Answered
I have plotting question
Here's something, with random data for 5 stations. % replace this with your data, an 11x12 matrix: data = 6*rand(5,12)+2.5 % ...

2 days ago | 1

| accepted

Answered
How to apply S-box on input data?
A=0:7; Sbox=[0,1,3,6,7,4,5,2]; N = length(A); X=de2bi(A,3,'left-msb'); U=[]; % res=[]; % w1=[]; for i=1:N U(i,:)...

2 days ago | 0

| accepted

Answered
I have sensors values in the form of multiple csv's want to read each file and if the length is less than 800 take average of each column and insert in the last of csv
This will do that, including the first column (which you can continue to ignore): tmp=load('D:\Testing\1464882962.m_proc_gyro.c...

2 days ago | 0

| accepted

Answered
How to organize a matrix by fixed intervals to calculate mean
v_mean_10_plus = mean(velocidade(declive > 10)); v_mean_0_10 = mean(velocidade(declive <= 10 & declive >= 0)); v_mean_10_...

2 days ago | 1

| accepted

Answered
How to copy a matrix but skipping some row and column?
A = reshape(1:24^2,24,[]) to_skip = [1, 2, 4, 6, 8, 17, 19]; % one way B = A; % 'copy', then B(to_skip,:) = []...

3 days ago | 0

Answered
how I show all the numbers in y axes
Maybe something along these lines? clc clear close all; T=[2.12E-5, 2.13E-5, 2.15E-5, 2.33E-5, 3.36E-4, 6.03E-4, 6.11E-4, 6....

3 days ago | 0

| accepted

Answered
load and plot many .mat files in a loop
Try it like this Data=load(strcat(P,File3)); semilogx(tc,Data.Z3) Somehow you dropped off the .Z3 when you tried this Data=l...

3 days ago | 0

Answered
Sorting table row variables with number and letters
It seems like you can rearrange the rows by using the second output from sort. If the abc_0_xyz, etc., are the RowNames of the ...

3 days ago | 0

Answered
matrix points from a plot
The below includes code for making such a matrix and also a table of the same information (take whichever is more useful): load...

3 days ago | 1

Load more