Answered
Possibly spurious solutions - Matlab blocked with no answers
Turns out there are some solutions In the below, fullsubs is not actually valid for all entries -- only for entries [5 8 13 16...

2 years ago | 0

Answered
How to find the best combination of angles for minimum turn radius
radius = 72; inner_angle = (0:68).'; outer_angle = (0:68); inner_angle_rad = inner_angle * pi /180; outer_angle_rad = outer_...

2 years ago | 1

| accepted

Answered
How is the work distributed in parfor loop?
You can control how parfor divides up the iterations by using parforOptions() RangePartitionMethod https://www.mathworks.com/hel...

2 years ago | 2

Answered
Vpasolve can not find a solution that I know it exist
There is no solution in the reals. clear clc %% Parameters and Assumptions syms x11 x12 x21 x22 positive % Actions syms a11...

2 years ago | 0

Answered
Attempt to execute SCRIPT ' ' as a function error
This problem is caused by a corruption of the MATLAB installation, one that causes it to lose track of the internal implementati...

2 years ago | 0

Answered
"Busy" when running this code with ODE45
If you use ode15s and set the tspan to 15.01 or less than integration succeeds and shows most concentrations on the order of 10^...

2 years ago | 0

Answered
How to get y value?
Xtarget = 900; H = findobj('type', 'line'); xvals = arrayfun(@(h) h.XData, H, 'uniform', 0); yvals = arrayfun(@(h) h.YData, H...

2 years ago | 0

Answered
how would I randomly replace two elements in a row vector
y = char(randperm(27) - 1 + 'A'); for i = 1:iter idx = randperm(numel(y), 2); ynew = y; ynew(idx) = ynew([idx(2)...

2 years ago | 0

Answered
why am i getting the error "Incorrect number or types of inputs or outputs for function step."
The most likely problem is if you do not have Control System Toolbox installed.

2 years ago | 1

Answered
Need help for global fit
To confirm: you want to optimize so that C, D, E are the same for all datasets, but A and B vary according to the datasets? The...

2 years ago | 0

Answered
Is reinstallation required if I already have ML installed from a previous license and just bought a home license?
I take it you transfered over the installed software using Time Machine or something similar. You do not need to reinstall. Re-...

2 years ago | 0

| accepted

Answered
How does the zoom out feature work?
As you zoom in, the tools internally keep a history of your positions. When you zoom out, the tool pops the previous position of...

2 years ago | 0

Answered
How to return corresponding entries of an array using if statement
mask = intabsul == absintul & intabsur==absintur; subset_xi_1 = xivals(mask); subset_Lv_1 = Lvals(mask); mask = intabsul ~=...

2 years ago | 0

Answered
How to test whether a function has roots within a given range?
has_root = SignF_X(1:end) ~= SignF_X(2:end); However, your approach is flawed. Suppose the input function is a sufficiently h...

2 years ago | 1

Answered
How can I make my model run in real time on a MacBook CPU?
https://www.mathworks.com/support/requirements/simulink-desktop-real-time.html Other Requirements Simulink Desktop Real...

2 years ago | 0

| accepted

Answered
Problem using start and getsnapshot
You have an existing videoinput active. For example you might have used control-C to stop acquisition, and so missed out on dele...

2 years ago | 0

Answered
MATLAB doesn't give an answer for this Waterfall graph and runs this continuously, what's wrong with this?
You need to vectorize Reduced size here to fit within the time limits. a = linspace(0.01, 10, 401); r = linspace(0.1, 10, 401...

2 years ago | 0

| accepted

Answered
Symbolic expressions with pi are displaying as decimals
sympref('FloatingPointOutput', 0)

2 years ago | 1

| accepted

Answered
How to resolve"Unable to perform assignment because the left and right sides have a different number of elements."?
My guess at the moment is that you are operating on a combination of row vector and column vector, which would give you a full 2...

2 years ago | 0

| accepted

Answered
Not able to save a ".mat" file when the excel workbook is fetched within a function
You are saving the contents into the base workspace, but you are trying to save it in the function workspace. cmd = "save('" + ...

2 years ago | 0

Answered
Accuracy of Integral and Integral2 functions
Given that code, the eigenvalues come out the 3.516 and so on. It isn't a matter of low accuracy: I switched to high accuracy h...

2 years ago | 0

Answered
The MATLAB Live editor provides bad user experience? How do I fix them?
To increase the contrast, install the desktop beta; https://www.mathworks.com/matlabcentral/fileexchange/119593-new-desktop-for-...

2 years ago | 1

| accepted

Answered
Please help me correct this error: Error in P_function>P_panelpower (line 26) elseif t>=6 && t<11 Error in P_function (line 10) P = P_panelpower(t);
You are passing a vector to your function. Inside your function you are testing the entire vector at the same time. If the enti...

2 years ago | 0

Answered
Access to non-public class members
In my oppinion, access modifiers are supposed to prevent a wrong usage of an interface, but it should not prevent you from invok...

2 years ago | 1

Answered
Access Excel-File stored in Microsoft OneDrive
You need to first use websave() or urlread() to read the contents of the file into local memory.

2 years ago | 0

| accepted

Answered
How to make latch switch
You have the difficulty that the event field is not going to update as long as you are inside the KeyPressFcn handler. You wil...

2 years ago | 0

Answered
Epanet 2.2 toolkit for matlab
It is not possible to create a numeric vector that has 1 column in place but 2 columns when needed. You can do things like hor...

2 years ago | 0

Answered
I have changed to a newer mac and can't get matlab opened. see belos
You need to deactivate MATLAB on the old computer, and activate it on the new computer.

2 years ago | 0

Answered
How do I index an array with varying dimension?
If you use a trailing dimension of : to index, then the result has the proper size but with the dimension "unwrapped" A = ones(...

2 years ago | 0

| accepted

Answered
How do I call a function from the command window
xval = input('enter x: '); myEquation(xval) function myEquation (x) a = 0.4361836; b = 0.1201676; c = 0.93729...

2 years ago | 0

| accepted

Load more