Answered
remove non-unique columns even if the sign has changed
Make a copy of newca1, let's call it M. Multiply each column of M whose first element is negative by -1. This way if you think o...

1 year ago | 0

Answered
Error using Matlab's publish function to create a pdf
I tried searching our internal bug database but I didn't find anything that looked exactly like this issue. I've reached out to ...

1 year ago | 0

Answered
Request for Cancellation of Full Toolbox Tutorial and Reversion to Original Trial State
Please contact Customer Service directly using this link with this request.

1 year ago | 1

Answered
Clicking on hyperlink for an "example" on MATLAB command line help changes my current directory
Do you want to read the example and potentially run some or all of it? I think that's a pretty common workflow for the examples....

1 year ago | 0

Answered
How does code sharing work in MATLAB?
Some of the functionality listed in the Software Development Tools category in the MATLAB documentation was not available in 202...

1 year ago | 1

Answered
cant get object's method to return multiple outputs
From the error message I suspect the class overloads indexing, either by overloading subsref or using one or more of the indexin...

1 year ago | 0

| accepted

Answered
defining upper and lower limits of a matrix
If you were using release R2024a or later (or if upgrading is an option) you could use the clip function. M = magic(5) M2 = cl...

1 year ago | 1

Answered
sprintf
This wasn't an option when the question was originally asked, but in more recent releases I recommend storing the names as a str...

1 year ago | 0

Answered
keep exact position of subplot axes
To clarify, when you say "position" do you mean the location of the subplot axes in the figure window, the limits of the axes (s...

1 year ago | 0

Answered
Trouble parsing ISO8601 date strings into datetime
Looking at the description of the Format property on the documentation page for the datetime function I think you want ZZZZZ or ...

1 year ago | 2

Answered
Are namespaces packages?
It is a new thing. namespaces The + directory hierarchy that used to be called packages are now called namespaces, so using an...

1 year ago | 1

| accepted

Answered
How to find the RMSE?
If you're using release R2022b or later, use the rmse function on your data.

1 year ago | 0

Answered
Converting product into individual entries
If you have the individual terms and their replication factors already, see the repelem function. If you don't you may need to u...

1 year ago | 0

| accepted

Answered
How do I create a game update in a while loop
numPasses = 0; expectedDuration = seconds(1/30); while numPasses < 5 dt = datetime('now'); n = 0; while datetime('now')-dt ...

1 year ago | 0

Answered
save() seems to be saving objects that should be destroyed, causing errors when the resulting .mat file is loaded
txs = txsite("AntennaHeight",1.5, ... "Latitude", 38.9899587, "Longitude", -76.9353889, ... "Transmitt...

1 year ago | 0

Answered
Optional Arguments in Function as Struct Input
Use the namedargs2cell function.

1 year ago | 0

| accepted

Answered
How do I include a command line in my app when using MATLAB Compiler?
No, you cannot include the Command Window in your deployed application. Since you mention App Designer and "change directories",...

1 year ago | 0

| accepted

Answered
how can i open .lod extension and .iqd extension file in matlab?
That depends. What do those files represent? Looking at a file extension database a file with the extension .lod could be from: ...

1 year ago | 0

Answered
Loading user-defined classes from .mat files absent the classdef
At one time, if I had a .mat file with a user-defined class variable, but lacked the classdef file, loading the .mat file would ...

1 year ago | 0

| accepted

Answered
where can I find the code?
Go to the webpage or documentation page for the example that calls that function. Use the button to open that example inside MAT...

1 year ago | 0

Answered
Correct way to test if a value is a function?
If you are debugging (note: don't use this in "production" code, as called out in the Note on its documentation page) you could ...

1 year ago | 0

Answered
Code Matlab for a function that depends in a real parameter
Parameterize the function you pass into the integral function. See the "Parameterized Function" example on the integral document...

1 year ago | 0

Answered
Why the squeeze function squeeze 1x3 array to 1x3, but squeeze 1x1x1x3x1 to 3x1?
If I recall correctly (this was before my time at MathWorks started) squeeze was introduced when we introduced arrays with more ...

1 year ago | 0

| accepted

Answered
Is there a function to tell if Matlab is using little-endian or big-endian on current computer?
See the third output from the computer function. [str, maxsize, endianness] = computer

1 year ago | 0

| accepted

Answered
Vector where each value is X times larger than the last
Use cumprod. x = [2 3*ones(1, 4)] y = cumprod(x) If you don't know how many elements you want y to have, just what you want t...

1 year ago | 0

| accepted

Answered
Constraint set to be a real number
The outputs from the nonlinear constraint function should not be boolean values. They should be continuous values. Try making y...

1 year ago | 1

Answered
i need activation key,pleases help me
If you're trying to use your company or educational institution's license, ask whoever maintains the organization's software lic...

1 year ago | 0

Answered
Parfor random numbers are not quite random
I would expect all the elements of v to be unique because they are randomly generated. However, I observe that many of them coi...

1 year ago | 0

Answered
From perpetual and individual Matlab student license to academic and permanent Matlab license
I recommend you contact Customer Service directly using this link or the Sales department directly using this link for help with...

1 year ago | 0

Answered
How to efficiently pass input arguments to a compiled app?
See this documentation page.

1 year ago | 0

| accepted

Load more