Answered
my arrow is not going directly underneath my subplot. please help to adjust position its driving me not happy tried for 4 hours
unfortunately the coordinates for annotate() are relative to the figure (or possibly the container if you use uipanel, I would h...

3 years ago | 0

Answered
Is it possible to construct gaussian processes custom kernels with built in functions?
You can use str2func to convert a function name or text expression into a function handle. kfcns = {'exponential','squaredexpon...

3 years ago | 0

| accepted

Answered
How do I link MATLAB for optimization in Aspen HYSYS?
If all goes well then you have matlab code that will use ActiveX to communicate with a live Aspen process, exchanging data and c...

3 years ago | 0

Answered
A fair coin is flipped 15 times. How to find the probability distribution for the number of heads, and how to draw a histogram of the probabilities.?
Your bins are width 1, at least in the diagram. The area of the bin will be the width (here, 1) times the height (which is the c...

3 years ago | 0

Answered
How can I process this matrix into my equation to produce multiple outputs and then plot
var = [.25, .5, 1, 2, 4]; vector, c = var*cr; Vector. E = (F/m)/sqrt((w^2 - omega^2) + (c.*omega/m).^2) ^ Matrix ...

3 years ago | 0

Answered
variable is not recognized from other function
function [pa,Ta,sa,cpi,Mi,nin] = AirProperties() You define AirProperties as returning six separate outputs. airprop= AirPrope...

3 years ago | 0

| accepted

Answered
Conversion from logical to sym is not possible
syms t That creates t as a 1 x 1 variable at the MATLAB level that contains information that links the MATLAB-level t to a vari...

3 years ago | 0

Answered
How do i make this section of code a callable function, I keep getting errors
What is the point of passing in i as the second parameter, if in the very first line you are going to overwrite i because of the...

3 years ago | 0

Answered
"Are you up-to-date on Software Maintenance" problem
Add-On Explorer can only be used if you are under Software Maintenance Support (SMS). If your support has expired then you need...

3 years ago | 0

Answered
bug with interp2 ?
[Xq,Yq] = ndgrid(lon_extraction,lat_extraction); h_extr_interp = interp2(xx,yy, v, X,Y); What do xx and yy or X and Y have t...

3 years ago | 1

Answered
Variable simulation not being able to be graphed.
Simulation = tally(k) - match/birthday_repeats; tally(k) is a scalar. So are match and birthday_repeats. So the right hand ...

3 years ago | 0

Answered
How can I add arrows onto the particles in my movie that indicate there movement with my code and how can I calculate the square displacement of each particle.
sqrt(mean(x.^2)) You can add arrows using quiver() or annotation() However given the color requirements you can tell they...

3 years ago | 1

| accepted

Answered
code won't run, but gives no error
Either there is no folder in the current directory that is literally named currentFolder or else the folder literally named curr...

3 years ago | 1

| accepted

Answered
How to change name of UIAxes plot when using a button?
title(app.UIAxes, "Derivative of " + method)

3 years ago | 1

| accepted

Answered
Audioread function and 32bit audio
If you encounter a .wav file with 32 bit single precision data, and the data is outside of the range -1:+1 then the data is out-...

3 years ago | 0

Answered
Signal Processing Toolbox is not working but it is installed
If we assume that T is the sampling interval then 1/T would be the sampling frequency, and fc/(1/T) would be the ratio of the cu...

3 years ago | 0

Answered
Why is the Matches variable too large?
days = randi(1,365); That does not request a random number between 1 and 365. That requests 365 x 365 random numbers in the ran...

3 years ago | 0

Answered
Error: Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters
I had to guess about what you are trying to do. n = 50; x = -1 + 2.*rand (1,n) y = -1 + 2.*rand (1,n) appr = (sum(x.*sin(1...

3 years ago | 0

Answered
I am trying to add images to my uifigure but I face the following error
The 'Icon' option became available in R2022a, which is the release after what you are using.

3 years ago | 1

| accepted

Answered
To write perfectly this command: A(i,:) = A(i,:) + h(i)*[0, ones(1,i-1), 0, ones(1,n-i)];
n = 3 A = zeros(n,n); So A will be initialized as 3 x 3 for i = 1:3 A(i,i) = -h(i); A(i,:) = A(i,:) + h(i)*[0, ones...

3 years ago | 1

| accepted

Answered
How to perform Eigenvalue Decomposition e.g, eig() on multiple GPUs?
That is not possible. The current status of support for splitting work across GPUs is described at https://www.mathworks.com/he...

3 years ago | 0

Answered
why is my code is not working?
poiss_var1 = poissrnd(λ1, [1, 10]); The λ is valid in MATLAB under the following circumstances: inside a % comment inside a %...

3 years ago | 0

Answered
Error in evolutionary ANFIS training in MATLAB
Problem.nVar=numel(p0); Problem.VarMin=-25; Problem.VarMax=25; You set the minimum and maximum for each FIS...

3 years ago | 0

| accepted

Answered
How can I create a periodic boundary that moves the integrin in my code to the opposite side of my domain when it crosses the boundary
Replace x(x<0)=0; x(x>L)=L; y(y<0)=0; y(y>L)=L; with x = mod(x, L); y = mod(y, L);

3 years ago | 1

Answered
Hello. Is there a way to set an inputdlg box to only allow 5 characters? For instance is someone tries to type 6 character it just doesnt let them?
No, inputdlg() has no provision for this. I do not know what the options are for uifigure (app designer). For traditional figu...

3 years ago | 0

Answered
How do I plot sin(x), cos(x) and tan(x) when they are selected on the drop down for MATLAB app designer?
switch method case 'Sinx' result = 'Cosx'; fun = @cos; case 'Cosx'; result = '-Sinx'; ...

3 years ago | 1

| accepted

Answered
how to write values in excel after fetching from other excel files
fusarium_cure1 = data1.Cure(fusarium_rows1); fusarium_cure2 = data2.Cure(fusarium_rows2); bacterial_cure1 = data1.Cure(bacteri...

3 years ago | 0

| accepted

Answered
Matlab 2023 release of Datafeed Toolbox, with function "signals" breaks - well, so much
MATLAB now does more static analysis of functions, under the assumption that variables are not being "poofed" into existence. ...

3 years ago | 0

| accepted

Answered
i keep getting this error when solving for Q1 in ode45. This is my code and the error. Could anyone fix the mistake or show me what is wrong?
This is exactly the same situation I discussed at https://www.mathworks.com/matlabcentral/answers/1956124-we-are-trying-to-use-o...

3 years ago | 0

Answered
How do I stop strings in matrices from displaying as NaN when using disp()?
perm_f = calc_perm(stage_frac, k); perm_flow = perm_f*ratio*stage_total; global permeates; global re...

3 years ago | 0

Load more