Answered
integral function returns 0 value
The numeric integration is too low of a precision and is giving a result that is very wrong. format long g Q = @(v) sym(v); ...

2 years ago | 0

Answered
How to fix a bug with 'sum' function?
These days, you can get an "undefined function" under the following circumstances: You are defining a function; and Somewhere ...

2 years ago | 0

Answered
Extract values from colormap
Put your color_range information together into one 12 x 6 array. Extract the first 3 columns, divide by 255 to get colors in the...

2 years ago | 1

| accepted

Answered
Having issue trying to solve a group of errors.
total_weight = m1 + m2 + m3; That is a variable [result, fval] = fmincon(@(x) total_weight(x), initial_guess, [], [], [], [], ...

2 years ago | 0

Answered
The code will not run when I tried to write the code successfully, so try fixing the code, please.
You need to split the code into different files. Problem 1: Note that you never call the function Bisection. Part A % Your c...

2 years ago | 0

Answered
Plot Function not displaying all points in data set
You have duplicate radius values. Also, the radius values are not sorted. OFF = @(R)R-1; x.data = readmatrix('TFL Lab 1.xlsx...

2 years ago | 0

| accepted

Answered
Right click to remove row(s) from uitable - example code is not working
Which release are you using? Some of that is only applicable to R2023b and later; https://www.mathworks.com/help/matlab/ref/uico...

2 years ago | 1

| accepted

Answered
User input to repeat a script
When you call "high level plotting commands" such as plot() or contour() or imshow() then by default they clear the current axes...

2 years ago | 0

Answered
User input to repeat a script
if strcmp(m, 'Quiz') Remember that in MATLAB, characters with ' around them forms a character vector. 'Quiz' is, for many purpo...

2 years ago | 0

Answered
How Do I Get My License Number?
If you purchased a Student license then there is no associated license number -- Student licenses work with "activation codes" ...

2 years ago | 1

Answered
Time based conditional statement
I have not used the pde functions myself. I have, however, used the ODE functions, and knowing something about those and reading...

2 years ago | 0

Answered
Using ibtws in Matlab 2023b
See https://www.mathworks.com/matlabcentral/answers/864360-trading-toolbox-functionality-for-interactive-brokers-in-matlab-r2021...

2 years ago | 0

| accepted

Answered
New data in same plot
In some cases you can use hold This will, however, not work if the code contains a call to figure that does not have a numeric...

2 years ago | 0

Answered
Why is the line of y2 always a flat line at x-axis instead of a straight line with negative gradient?
x = linspace(0, 20, 100); y1 = (exp(x)-1)/10; y2 = -x+3; %plot(x, y1, 'r'); hold on; plot(x, y2, 'g'); xlabel('Diode Volta...

2 years ago | 0

Answered
When trying to analyze multiple txt files from 1981-1983 using uigetfile, I get the error "unable to find or open temp_summary.01.1981". Check the path and filename"
[file_list, path_n] = uigetfile('*.txt', 'Temperature Climatology', 'MultiSelect', 'on'); You are ignoring both outputs of that...

2 years ago | 0

Answered
Matrix numeric inversion, very bad conditioned
Your array is sensitive enough that it matters that your text entries do not represent the full double precision values stored i...

2 years ago | 0

Answered
Is there a utility like nvidia-smi within matlab to determine which gpus are in current use?
No, there is no utility like that built into MATLAB. My understanding is that the order of GPUs in the gpu device list depends ...

2 years ago | 0

| accepted

Answered
Can I use fwrite for .mat file in Simevents block?
It is possible ... but it isn't at all nice. If you create the file with a save() command with the -nocompression option, then ...

2 years ago | 0

Answered
find x given y
syms x positive W=3*x.^2+6*x; t1a=solve(W == 3) t2a=solve(W == 9) t3a=solve(W == 45)

2 years ago | 0

| accepted

Answered
Is it possible to use a trial license with past release versions?
No, you need to contact Mathworks Sales to get a trial for previous releases.

2 years ago | 0

| accepted

Answered
select equity by touch
I suggest you consider using datatips; https://www.mathworks.com/help/matlab/creating_plots/create-custom-data-tips.html Not a...

2 years ago | 0

| accepted

Answered
How to include zero contour
taumin is not complex, so imag(taumin) is zero everywhere. There is no contour to create. You initialize taumin=ones(nu,nxi); ...

2 years ago | 0

| accepted

Answered
How can i describe this matrix of the size M by M by using ''spdiags command'' ?
Hint: init = repmat((1:6).',1,2)+[0 10] full(spdiags(init, [-4 4], spalloc(6,6,0))) So negative diagonals take elements from ...

2 years ago | 0

Answered
Why is max(abs(S)) not working? S is a 1x40000 vector
Either max or abs is a variable at that point in the code.

2 years ago | 3

Answered
What is the fastest way to eliminate noise in the frames ?
What is the fastest way to eliminate noise in frames for real time applications? The fastest way is to use zeros() to set the ...

2 years ago | 0

Answered
how can i convert in array char/string?
string({Sis.Underlying})

2 years ago | 0

| accepted

Answered
Whether Matlab is compatible with macOS?
No. The polyspace series of products is not available for Silicon Mac yet, and it may be a another few releases. There are al...

2 years ago | 0

Answered
Minimum objective vs Number of function evaluations
The optimizer observes a 7.5e-3 at roughly 12e7 function evaluations, and records that. But it does not assume that is going to ...

2 years ago | 0

Answered
unable to get code to run please help
You had some bad syntax problems in your code. Your PowerPlantCode2 function does not use the pressure, so it is pointless to o...

2 years ago | 0

| accepted

Load more