Beantwortet
Calculate mean value between 2 years
Not sure what is the format of your data. Use function isbetween and below shows an example that you can implement it into your ...

fast 4 Jahre vor | 1

| akzeptiert

Beantwortet
How to insert a column of zero into a 3D matrix?
Try this C=cat(2,A,repmat(B,1,1,size(A,3)));

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
Why do I keep getting this error with my for loop?
Remove the for loops, just use y_e1=coeffs(1)*exp(coeffs(2)*-ky_e1); y_e2= coeffs(1)*exp(coeffs(2)*ky_e2); y_e = [y_e1(:,1), ...

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
How do you vertically concatenate the rows of a cell array consisting of vectors of numbers?
Tru the following: cellfun(@(x) cell2mat(x),num2cell(a,1),'uni',0)

fast 4 Jahre vor | 0

Beantwortet
Why doesn't my figure(2) display anything?
Variable x has 8 numbers while variable a has 9 numbers. However, Variable y and b are calculated based on the value of variabl...

fast 4 Jahre vor | 1

Beantwortet
streak in a character array
Sorry that I overlooked the question in my previous answer, here is the updated one: cArr = 'aaaaBBc'; pos = find(diff([0,diff...

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
How can DropDown Items dynamically obtain the name of different sheets in Excel instead of manually entering items?
When you import the file, get the sheet names and put them as the 'Items' of the uidropdown. sheetName = sheetnames(fullfile(pa...

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
how to select an interval of certain hours each day within a larger timetable using timerange
Do you accept not using function timerange as follows? T = readtable('date.txt') T.Var1(hour(T.Var1)<9 | hour(T.Var1)>=17 & ~(...

fast 4 Jahre vor | 0

Beantwortet
plot graph based on given values
May be this: sheets = sheetnames('https://www.mathworks.com/matlabcentral/answers/uploaded_files/941694/my_excel_file.xlsx'); ...

fast 4 Jahre vor | 1

Beantwortet
How to get mean / averaged values among of duplicated data array?
Use function groupsummary opts = detectImportOptions('demo.txt'); opts.VariableNames = {'Time','Data'}; T = readtable('demo.t...

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
getframe(), rectangle specified in normalized coordinates instead of pixel coordinates
Try the following workaround f = figure; f.Units = 'normalize'; f.Position = [0.25 0.25 0.5 0.5]; % Location of...

fast 4 Jahre vor | 0

Beantwortet
Cutting a Circular Ring at particular points using angle-theta
Try to add the follwoing lines: alphaA = 15*pi/180; % Set the margin, 15 degree here [thet...

fast 4 Jahre vor | 0

Beantwortet
How do I change the x labels on a boxchart plot?
Try this: x=rand(3,3); figure hbx = boxchart(x); xMdn = median(x); boxw = hbx.BoxWidth; xd = 1:numel(hbx.XData); hold on ...

fast 4 Jahre vor | 2

| akzeptiert

Beantwortet
Split and count unique string in cell array
Use function groupsummary A = {'B25';'A35';'L35 J23';'K32 I25';'B25'}; T = table(A); groupsummary(T,'A')

fast 4 Jahre vor | 0

Beantwortet
error using horz cat in app desiner
Variable x is from min:100:max and hence it should not be a single number. However, varibale y in your code seems to be a singl...

fast 4 Jahre vor | 0

Beantwortet
Mean of a repeating numbers corresponding values
Use function groupsummary: A = [ 10 40; 10 60 ;10 90; 14 10; 14 20; 14 30; 14 40]; T = table(A(:,1),A(:,2),'VariableName',{'It...

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
pcolor - Numeric Ruler -> limits and scale commands
Try this: C =[1 2 3;4 5 6; 7 8 9]; pcolor(C); ax=gca; ax.YScale='log';

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
How to use scatterplot in a loop
Try this: clear;clc; Data1 = reshape(1:100*18,[],18); Data2 = randi([50 100],100,18); c = repmat(linspace(1,10,18),100,1); ...

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
How do I convert dates to days?
Use function days DateStrings = {'01-01-2022','05-01-2022','06-01-2022'}; t = datetime(DateStrings,'InputFormat','dd-MM-yyyy')...

fast 4 Jahre vor | 1

| akzeptiert

Beantwortet
Shading the area between the minimum and maximumlimits of my data
flip up down instead of flip left right since they are column vector. load('Data1.mat') x2 = [T(:,1); flipud(T(:,1))]; idx = ...

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
Why does this loop return the same value for the variable each time?
Just an addition: x=diff(Temp_F); z=conv(x,ones(300,1),"same"); temp_status = (z>15) + (z>=-15 & z<15)*2 + (z<-15)*3;

fast 4 Jahre vor | 2

Beantwortet
How to reduce matrix size conditionally?
Try this: mean(N_total,2,'omitnan')

fast 4 Jahre vor | 0

Beantwortet
Store plot values in a variable and then plot it
F.Values and F1.Values are those y-values only and hence the plot does not have any information about the corresponding x-values...

fast 4 Jahre vor | 1

| akzeptiert

Beantwortet
Perform angle recognition on the objects in the following images
Do some filtering before searching for lines. Need to increase the number of peaks to 20 for function houghpeaks otherwise it i...

fast 4 Jahre vor | 1

| akzeptiert

Beantwortet
How to generate Pattern in MATLAB
Try the following and you may adjust the numLines to 1000 (Following demo is using 100). Nx = 1000; Ny = 1000; numLines = 100...

fast 4 Jahre vor | 0

Beantwortet
Trouble getting array to fill in properly
The for loop starts from 2 to n, which is 7 in your case. However, the matrix has 8 rows and 8 columns and hence you never touc...

fast 4 Jahre vor | 0

Beantwortet
Radar System PPI polar display
You can set the RTick value as follows: theta = linspace(0,2*pi); rho = 20*sin(theta); subplot(1,2,1); polarplot(theta,rho);...

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
how to get the contour/shape of a representation in 2D?
Point #8 is close to the previous one and you have to break it into 2 parts and combine them manually. Of course, if the code i...

fast 4 Jahre vor | 0

Beantwortet
I need to know how to create a contour plot that changes with time.
Update the contour plot properties from the 2nd data. Check this example: clear; clc; t = 1:10; for k = 1:10 x = linspa...

fast 4 Jahre vor | 0

Mehr laden