Beantwortet
Pick a time in app
As apparently this feature has not been implemented in the app designer I decided on making an app of my own doing that exact th...

fast 4 Jahre vor | 1

| akzeptiert

Frage


Pick a time in app
Is it possible to pick a specific time of a specific day from an app? The DatePicker component allows for selection of a specif...

fast 4 Jahre vor | 1 Antwort | 0

1

Antwort

Beantwortet
Plotting connected dots with two different colors (One for the dots and one for the lines)
It is the 'MarkerEdgeColor' and 'MarkerFaceColor' properties. data = randn(4,1)*3; figure; p = plot(data,'-','color',[0.7 0 0...

fast 4 Jahre vor | 1

| akzeptiert

Beantwortet
Check for most occurent result in every index of a string array, how? Mean of string array.
I'm not completely sure I get the question, but in theory you could simply convert the char array to numbers and revert to chara...

fast 4 Jahre vor | 0

Frage


Use of SizeChangedFcn for altering labels
I have created a function (attached fixticks.m) which I often find more convenient than using xtickformat as it is more dynamic ...

fast 4 Jahre vor | 0 Antworten | 0

0

Antworten

Beantwortet
Creating a code that calculates acceleration simulation
x = [0, 10, 20, 30, 40, 50]; %time in minutes y = [0, 60, 120, 280, 150, 40]; %distance travelled in x minutes xForward = x...

fast 4 Jahre vor | 0

Beantwortet
Add markers to stem plot above a threshold
Either by plotting the stem plot in two steps (over and under cutoff) data = rand(18,1)+randperm(18)'; figure;axes;hold on; c...

fast 4 Jahre vor | 0

Beantwortet
Create results .txt files with loop
Yes you should use fprintf - but you need a format input as well to get new lines. textfile = 'data1.txt'; fid = fopen(textfil...

fast 4 Jahre vor | 0

Beantwortet
plotting two curves together in one graph for different intervals
Hi Tania When plotting a function you've already described as a function handle I'd use fplot rather than plot. As far as I ca...

fast 4 Jahre vor | 1

| akzeptiert

Beantwortet
Find the average for a matrix excluding data in the first column
You could simply add another mean around it: totalave = mean(mean(sensor(:,2:6))); Or you could introduce a temporary variable...

fast 4 Jahre vor | 0

Beantwortet
Plotting with categorical data
Based on the help for the bar plot function with categoricals the solution is possibly to use the reordercats function. I found...

fast 4 Jahre vor | 1

| akzeptiert

Beantwortet
How to plot this function
You need to use the element-wise multiplication/division (.* or ./) rather than the matrix based multiplication (* or /). See a...

fast 4 Jahre vor | 1

Beantwortet
input function as plot title?
I think this would do it function_name = input('Enter a function:','s'); fh = str2func(strcat('@(x)',function_name)); fpl...

fast 4 Jahre vor | 0

Beantwortet
month number to month name function
This snippet should do it using existing functions. month_number = 11; month_name = datestr(datetime(1,month_number,1),'mmmm')...

fast 4 Jahre vor | 2

Beantwortet
Using name of saved matrix
I think you should go a different route where you don't save your variables to .mat files and simply keep the variables in your ...

fast 4 Jahre vor | 1

| akzeptiert

Beantwortet
least square solution of linear system of equations
Although you should do your homework yourself I think I can help you : ) This problem could be solved with the backslash operat...

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
Create a triangular function
Hi Mikkel I'm not quite sure whether I have understood how much of a mathematical function you would prefer for the graph to be...

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
How to count the values in a column with different lower and upper bounds from excel?
I think it will be solved by using this snippet D = xlsread('data.xlsx','sheet1'); a = D(:,1:2:6); %or 2:2:6 as you proposed.....

fast 4 Jahre vor | 1

| akzeptiert

Beantwortet
Show Values on bar graph; above bar when positive values, below bar when positive values
Just add an additional line, indexing the text according to ytips2 xtips2 = b(1).XEndPoints; ytips2 = b(1).YEndPoints; ...

fast 4 Jahre vor | 1

Beantwortet
I want to export a figure but with 50% smaller Width and height
Hi Behzad, I think that rather than using the set(gcf,'Units','Normalized','OuterPosition', [0, 0.04, 1, 0.96]) you should u...

fast 4 Jahre vor | 1

| akzeptiert

Beantwortet
Import dates from csv files and plot them
Hi Sarlota As far as I can tell from your question, the problem arises in the lines DateString = datestr(str); DateNumber = ...

fast 4 Jahre vor | 0

| akzeptiert

Beantwortet
read table handling column of number values as column of strings
Hi Daniele I have provided a function for you that seems to do the trick (attached and in code-block below). Feel free to use ...

fast 4 Jahre vor | 1

| akzeptiert

Frage


Save figure userdata to a workspace variable
I have assigned some the data and metadata (and some additional stuff) as 'Userdata' to a figure in order to assure that the gra...

fast 4 Jahre vor | 1 Antwort | 0

1

Antwort

Beantwortet
How to select every 11th element in a vector?
Hi Daniel You should be able to do that using the 'reshape' function (see its help for further description). output = reshape(...

etwa 4 Jahre vor | 0

| akzeptiert