Beantwortet
Plots combining into one
In line 32 of your code there is a (second) "hold on" which acts on the active axes. If you want to have two figures with one ax...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
Extracting Data from Tall Arrays using Logical Indexing
I think you mentioned everything that you need for this task. Try this as a starting point: clearvars, close all clc % some...

mehr als 4 Jahre vor | 0

Beantwortet
what does this line mean
ones(r, c) creates an array of ones with r rows and c columns. That said, ones(1, c) creates a line vector with c elements. Her...

mehr als 4 Jahre vor | 0

Beantwortet
I have a set of nonlinear equations (run by rk4 method). How can I compute the Jacobian for those?
Assume you have the set of nonlinear eqations and the vector of independent variables defined in Matlab, then you can use the j...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
Write value to gauge in MATLAB design app
In the inspector, look for the label of the gauge. Originally it is labeled as "Gauge". You also see this on the code page insid...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
Get every possible combination of an array
This could be a starting point: clearvars, close all clc arr = [-1 1 -1 1 1 1 1 1 -1]; num_arr_elements = numel(arr); ...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
how process sequence of the images in a loop without overwriting
Have a look at your first for loop. Here you are generating a char called fileName which is overwritten in every loop count. fur...

mehr als 4 Jahre vor | 0

Beantwortet
Deleted on request by my prof. Sorry
I assume that In your code line 28 it should be t(j) and t(j-1) instead of t(n) and t(n-1) respectively. Then your code at least...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
Data loading in MATLAB
Hi, have a look at uigetfile and uiopen which open a file selection dialog box. This should solve your issues. Regards, Benni...

fast 5 Jahre vor | 0

| akzeptiert

Beantwortet
How to plot data from different folders
You can get the file information (name, folder, date, ...) of files within subfolders using the dir command and wildcards. e.g. ...

mehr als 6 Jahre vor | 1

| akzeptiert

Beantwortet
How to use a double index with a restriction under a for loop along with indicator function to calculate the occurrence of a given state
Sorry, i do not understand your condition and explanation for "if abs (x(i)- x(i-j))= j then S(x)=1". x is a vector. Do you want...

mehr als 6 Jahre vor | 0

Beantwortet
Z must be a matrix, not a scalar or vector
You calculate Z (or Q2) using variables that you do not provide us. so it is not possible to give an adequate answer. Is Q2 a ma...

mehr als 6 Jahre vor | 0

Beantwortet
Moving average on window of latest inputs with Exponential Weighting method
One possibility is to use the discrete filter block with denominater = [1] and Numerator are the exponential weights. If you do ...

mehr als 6 Jahre vor | 0

Beantwortet
how i can use nntool with a scipt
Use nnstart instead of nntool ("nntool is no longer recommended"). Within nnstart you can choose your tool (nftool, nprtool, ...

mehr als 6 Jahre vor | 0

Beantwortet
How can I define these on matlab?
When f is a function, then you can not "define" something like f(low) = ... because the stuff in brackets is passed to t...

mehr als 6 Jahre vor | 0

Beantwortet
Use of loops to print the contents of a cell array with varying number of rows
Use a struct array instead of cell array and then disp inside an arrayfun: clearvars close all clc system(1).Title ...

mehr als 6 Jahre vor | 0

Beantwortet
Deriving the time-domain response of an equation, from a tf
Try <https://de.mathworks.com/help/symbolic/ilaplace.html ilaplace>. Before that you have to convert the tf object to sym object...

mehr als 6 Jahre vor | 1

Beantwortet
I don't get the answer that i want?
What is the purpose of your code? You prompt for iii (3xi) and loop through iiii (4xi); Within the loops nothing changes, right?...

mehr als 6 Jahre vor | 0

Beantwortet
Is there a script function or variable to determine if running on desktop?
From the documentation: USED = desktop('-inuse') % returns whether or not the Desktop is currently in use. It does not sta...

mehr als 6 Jahre vor | 1

| akzeptiert

Beantwortet
Im ploting a graph where my x axis is in time format. How do I adjust the intervals of the x axis to be 15 minutes? Start at 00:00:00 ending at 23:45:00
You can get the char array containing your requested date values by charArray = datestr(0:minutes(15):hours(23.75),'HH:MM:ss...

mehr als 6 Jahre vor | 0

Beantwortet
How to make a softer plot using a moving average every ''x'' skips?
If you have signal processing toolbox than you can use moving average filter or more advanced filtering techniques as described ...

mehr als 6 Jahre vor | 0

Beantwortet
How to concatenate variables from the workspace with a constant part in their name?
You can use the cell returned by the who command and pass it to the "eval" function to get the values of the variables. You coul...

mehr als 6 Jahre vor | 0

Beantwortet
saving all figures as jpeg file on harddrive
Collect all the figure handles in a figure handle array, e.g. f(ii) = figure; and then work with arrayfun on the saveas command...

mehr als 6 Jahre vor | 0

| akzeptiert

Beantwortet
I want to find particular values of t at which y becomes 2 (by writing some commands in code itself). Can I extract such values of t as a vector?
You could rewrite your function so that your wanted data points are maxima and search them with findpeaks. [~,locs] = findp...

mehr als 6 Jahre vor | 0

Beantwortet
How can I display the email address of the account that is logged in Outlook?
Maybe you can use the SmtpAddress Property of the account object? clearvars, close all, clc acx = actxserver('outloo...

mehr als 6 Jahre vor | 0

| akzeptiert

Beantwortet
How to remove whitespace around subplots keeping margines for writing x/y labels and ticks?
For such tasks, i prefer using the OuterPosition property of axes. I.e.: clearvars close all clc f = figure; ...

mehr als 6 Jahre vor | 0

Beantwortet
I needed help with this GUI. So essentially in isolation, How do i get the static text to show this 'ans' variable in the worksapce?
You can use "evalin" to evaluate an expression in the base workspace. <https://de.mathworks.com/help/matlab/ref/evalin.html>

mehr als 6 Jahre vor | 0

Beantwortet
Solving heat transfer equation using finite difference method
You start with i=1 and one of your indices is T(i-1), so this is addressing the 0-element of T. In Matlab we start with index 1....

mehr als 6 Jahre vor | 0

Beantwortet
vector of X values contains duplicate values
The heatmap functions first two arguments are in this context the labels for the x-axis and y-axis. These have to be unique and ...

mehr als 6 Jahre vor | 0

Beantwortet
How can I move a point parallel to a created plane?
Assuming your points are called p1, p2 and p3: One simple approach would be to define a coordinate system (non-orthonormal) with...

mehr als 6 Jahre vor | 0

| akzeptiert