Respondida
Update doesn't work, is uninstall and reinstall too risky?
Update does not work, "I have no rights to write" to the drive/directory. Did you install MATLAB originally or did someone in y...

casi 4 años hace | 0

Respondida
Using to the 'fill' function to plot a filled polygon that are confidence intervals
Let's draw the region "around" a simpler line. x = 1:10; y = x; plot(x, y, 'k', 'DisplayName', 'Original Line'); legend show...

casi 4 años hace | 0

Respondida
How to code "e" by itself in equation e-1?
@Torsten and @Matt J are correct to suggest the exp function, but if the quantity x/a can be very small you might also want to l...

casi 4 años hace | 1

Respondida
Previous matrix numbers in the formula and creating a new matrix
The arithmetic operators plus, +, minus, -, times, .*, ldivide, .\, rdivide, ./, and power, .^ operate element-wise. x = 1:5 y...

casi 4 años hace | 0

| aceptada

Respondida
How can I change the variable x0 to x2,x3,x4,...xn . So it still produces the same pattern?
Can you dynamically create variables with numbered names like x1, x2, x3, etc.? Yes. Should you do this? The general consensus ...

casi 4 años hace | 0

Respondida
I attached an old Matlab man page from 1982.
I haven't looked at that document but since that was prior to the incorporation of MathWorks in 1984, I'm guessing that's a vers...

casi 4 años hace | 0

| aceptada

Respondida
Improve efficiency of for and if loops
I'm not 100% certain but based on the description I think either ismembertol or histcounts2 (specifically the 4th and 5th output...

casi 4 años hace | 0

Respondida
Matlab Unit test framework, general questions about the structure
Taking each question in turn: Documentation how I can understand what part of the online documentation is valid for my current...

casi 4 años hace | 0

| aceptada

Respondida
I'm trying to convert a 1 dimension lat,lon,data to 2d data . Is this possible?
My aim is to regrid the data from original resolution to a desired resolution (ex. 2.5x2.5 degree) and count the number of data ...

casi 4 años hace | 1

Respondida
Print matrices whose name is based on loop values
Can you dynamically create variables with numbered names like k1, k2, k3, etc.? Yes. Should you do this? The general consensus ...

casi 4 años hace | 2

| aceptada

Respondida
Take values greater than 0 excluding NaN
A = [NaN NaN 1; NaN -2 -3; NaN NaN NaN; 2 NaN -3; NaN -3 -3; 1 -1 0] % Adding an explicit 0 B = A; B(B <= 0) = 0; B(B > ...

casi 4 años hace | 0

| aceptada

Respondida
n E Z => sin(n*pi) = -1 ?
Use the sinpi function. n = 100000000000000000000000000000; sinpi(n)

casi 4 años hace | 2

Respondida
Remove duplicate edges of undirected graph
Call simplify on your multigraph (you can tell if your graph or digraph is a multigraph using ismultigraph) to convert it to a s...

casi 4 años hace | 0

| aceptada

Respondida
Plotting a multidimensional array (or a 3D matrix)
What type of plot do you want to create? Look at the thumbnails in the Plots Catalog (the Plots tab of the Toolstrip) and see on...

casi 4 años hace | 0

Respondida
Remove nodes in a graph based on label name instead of index
B = graph(bucky, string(1:60)); % Use '1' through '60' as names head(B.Nodes) % Show the first few node names B2 = rmnode(B, '...

casi 4 años hace | 1

| aceptada

Respondida
undefined function error for builtin toolbox function
If this recurs in the future, you don't need to reinstall. Likely you had a directory on your MATLAB path that contains an imple...

casi 4 años hace | 0

Respondida
2D-Histogram with log y and x ticks
Instead of using hist3 I recommend you use histogram2. edges=2.^(-8:0) % Set the lower limit to be whatever will cover your dat...

casi 4 años hace | 0

| aceptada

Respondida
Reading numbers from String
Yet another approach: str = {'SRm40_','SRp5_'}; str = replace(str, 'm', '-'); % Handle negative numbers str = replace(str, 'p...

casi 4 años hace | 0

Respondida
Create Categorical array for histogram on R2020a
I tried running those three lines of code in release R2020a and it produced the categorical histogram plot that I expected. Wha...

casi 4 años hace | 0

Respondida
I generated code in MLSL in R2022b pre-release and have this error "File could not be copied. LWS Export failed". How could I solve this issue?
Please send any questions or feedback related to a Prerelease of MathWorks products to Technical Support directly instead of pos...

casi 4 años hace | 0

Respondida
Alternative to 'findpeaks'
See the islocalmax function that is part of MATLAB.

alrededor de 4 años hace | 3

Respondida
there is no output, it's keep running but no output, why so?
Let's look at the value of your integrand at the starting values. ti = 0; %inital time tf = 100E-4;% final time tspan=[ti tf]...

alrededor de 4 años hace | 1

Respondida
Properties of Polaraxes in App Designer not working
As a high-level plotting function, by default polarbubblechart will reset most of the properties of the polaraxes to their defau...

alrededor de 4 años hace | 0

| aceptada

Respondida
Choosing the best algorithm for fmincon
I haven't seen anywhere the ability to assign first-order optimality to a variable. Take a look at the documentation for the ou...

alrededor de 4 años hace | 0

| aceptada

Respondida
Ordinary differential equations for a buckled column
The "Solve Nonstiff Equation" example on the ode45 documentation page bears some resemblance to your ODE if you replace in the ...

alrededor de 4 años hace | 0

Respondida
Plot one data set with two different units?
Let's plot some sample data on the left axes. yyaxis left plot(1:10) Now add a right axis. yyaxis right Change the Y limits...

alrededor de 4 años hace | 0

Respondida
Wrong behavior of symbolic number creation in R2022a
Did you change your symbolic preferences without realizing it? sympref('FloatingPointOutput',true); x = sym(1/3) sympref('Flo...

alrededor de 4 años hace | 0

| aceptada

Respondida
How to use xline?
The ability to create multiple vertical or horizontal lines by passing a vector of values into the xline or yline functions was ...

alrededor de 4 años hace | 0

| aceptada

Respondida
Storing a Matrix Output in a matrix
You have 4220 (= 844*5) eggs and an egg carton with 844 cups. How can you fit all 4,220 eggs into 844 cups (and no, scrambling t...

alrededor de 4 años hace | 0

| aceptada

Respondida
I'm new to Matlab and still learning, how do I go about solving this problem in simple terms?
initial=1000; month = 1:1:120; You don't want this to be a vector. Make it a scalar (one number) that represents the month who...

alrededor de 4 años hace | 0

| aceptada

Cargar más