Answered
Random Video Writer Error on Close
folder = "E:\Uni\Imaging\23-11\13"; files = dir(fullfile(folder, "*.mat")); .mat files are looked for directly under "E:\Uni\I...

4 years ago | 0

Answered
How to use semiology using data given in .txt form
Independent_Variable = HbData(:,1); First_Dependent_Variable = HbData(:,2); First_Marker = 'o'; semilogy(Independent_Variable...

4 years ago | 0

Answered
bwboundaries mistaking holes for children
You specifically ask for the boundaries for 'holes', so the boundaries you get back include the boundaries for holes. Your blac...

4 years ago | 0

Answered
Why reshaping the matrix gives entirely different plots while using pcolor()
pcolor() is equivalent to surf() followed by view(90) . surf() does not use the input data directly to compute face color. Inst...

4 years ago | 0

| accepted

Answered
Counting number of logical falses returned
function ButtonPushed(app, event) if ~contains(str,pat); app.EditField.Value = app.EditField.Value + 1; end en...

4 years ago | 0

| accepted

Answered
Error "The length of X must match either the number of rows or the number of columns of Y" while trying to plot data
When cond == 0 then country_daily_cases=zeros(1,n); which is 1 x number of columns in the covid data. bar(app.U...

4 years ago | 0

Answered
Anonymous Functions - how to store the results of anonymous functions
belBar=@(bel, u_t)[bel,u_t]; That is a function handle applyMeasurementUpdate = @(sensorReading, belBar) [ belBar '.MU(' senso...

4 years ago | 0

Answered
How to remove "root(f(z), z, n)" from solve solution?
syms f B r L k c g t S u v h m w J a n p V D A mu q m1 m2 m3 assume(f,'positive') assume(r,'positive') assume(k,'positive')...

4 years ago | 0

| accepted

Answered
find out dependent variables from an expression
syms x(t) y=x^2+2; findSymType(y, 'symfun')

4 years ago | 0

| accepted

Answered
Turning a moving piece puzzle on a matlab script into an app component.
Inside code created with App Designer, you can make calls to whatever external function (in its own .m file) that you want.

4 years ago | 0

Answered
function input to solve ODE
F = @(t,u) [u1(t,u), u2(t,u), u3(t,u)]; % define the function 'handle', F

4 years ago | 0

Answered
Button press emulation matlab
Each button has an associated Callback property. To emulate pushing a button, have the program create a fake event structure (if...

4 years ago | 1

Answered
Inserting NaN values between results
All_RF_Cumm = []; for ... whatever looping is appropriate ... stuff RF_Cumm = whatever is appropriate if i...

4 years ago | 0

Answered
How to display Date as output in Appdesigner?
If you are using datetime() objects, then min() and max() are available for those. You can set the Format property of a datet...

4 years ago | 0

Answered
Having problem with a infinite double sum
You might be able to simplify the output if you can put constraints on the values. This takes a while... It might possibly tak...

4 years ago | 1

| accepted

Answered
hi this is my homework ı want to sort matrix A from smallest to largest.But I m stuck here .Can you help me ? Ps:I cant use sort,min,max or other functions
clc;clear; A=[24.3 24.8 24.6 24.0 22.3 21.0 20.5 20.7 18.8 17.6 15.5 17.5 19.0 19.8 21.4] B=[] for i=1:length(A) ek=10...

4 years ago | 0

Answered
Separate arrays within loop using indexing?
start = [1,8]; stop = [7,11]; data = [2,2,2,3,3,4,4,2,3,4,4,2]; seperated_data = arrayfun(@(B,E) data(B:E), start, stop, 'uni...

4 years ago | 0

Answered
hi this is my homework ı want to sort matrix A from smallest to largest.But I m stuck here .Can you help me ? Ps:I cant use sort,min,max or other functions
It is not possible to solve that problem in MATLAB without using any functions. For an explaination see https://www.mathworks.co...

4 years ago | 0

Answered
Assign same number of elements to the column data based on number of elements (each row) of the other column
This code creates the desired data. I notice that the desired data already appears to exist inside the file -- though it might ...

4 years ago | 0

Answered
Trigonometric functions using dsolve
syms theta_1(t) sin_theta_2(t) theta_3(t) ode1 = diff(theta_1) == 1 + sin_theta_2 - theta_1; ode2 = diff(sin_theta_2) == 1 + t...

4 years ago | 0

Answered
How can I speed up image manipulation of a .fig?
The following code replaces the lines for each axes with a single continuous line object that uses NaN to break up the pieces. I...

4 years ago | 0

Answered
Show time in x axis with increments of 10minutes
t_start = datetime('10-Jun-2015 03:30:00'); %(which is the start time) t_end = datetime('10-Jun-2015 05:00:00'); %(is the end t...

4 years ago | 1

| accepted

Answered
How to set equations as my x and y axis
time2 = [0 5]; %NOT DEFINED IN ORIGINAL QUESTION % 1. Define coefficients km = 0.5; % 1/day Ks = 2; % mg P/m3 k23 = 0.1;...

4 years ago | 0

| accepted

Answered
return column vector (t(i+1) & y(i+1)) instead of row vector
t = zeros(N+1,1); y = zeros(N+1,1);

4 years ago | 0

| accepted

Answered
K-means clustering for lower triangle of matrix
X=tril(data,-1); That is going to createa a 52 x 52 matix [idx,C] = kmeans(X,3); Each row of the matrix will be treated as t...

4 years ago | 0

Answered
Value not adding to variable in array
You have a property named app.Count4 and that is completely different than your property app.Count . There is no connection betw...

4 years ago | 0

| accepted

Answered
Calculating returns of a table structure and error operator '-' is not supported for operands of type 'table'.
Ri = diff(stock{:,i}) ./ stock{1:end-1,i} Or to vectorize, Ri = diff(stock{:,:}) ./ stock{1:end-1,:} Some people prefer to us...

4 years ago | 1

| accepted

Answered
Unable to perform assignment because the left and right sides have a different number of elements.
for m=0:Nquad m will be an integer scalar N = 2^m; %N=1,2,4,8,16,32, in turn N will then be an integer scalar h=(b-a)/N; w1...

4 years ago | 0

Answered
Determinant of kglo matrix is showing zero but really its not actually zero
format long g kglo =[ 56 -56 0; -56 86 -30; 0 -30 30] det(kglo) det(sym(kglo)) rank(kglo) kglo(1,:) + kglo(...

4 years ago | 0

Answered
How do i add tolerance to the code. PLS HELP.
MIEIdx = find(abs(MIE_2 - MIE) <= tol); This might have 0 or more matches. You might also be interested in [dist, MIEIdx] = m...

4 years ago | 0

| accepted

Load more