Answered
svd(X,"econ") does not work as expected if X is square nxn matrix with rank<n
If you want a number of singular values fewer than the maximum number, consider using svds. Though for a tiny problem like this ...

4 years ago | 0

| accepted

Answered
can we plot convergence of a ode solver same as fsolve?
I think what you may be looking for is the OutputFcn. See the entry in the Name-Value Arguments section on the odeset function d...

4 years ago | 0

| accepted

Answered
Can I make addpoints function show me more than one curve in ONE figure ?
So you want multiple animated lines in the same figure? That's easy, just use multiple animatedline objects. x = 0:360; axis([...

4 years ago | 1

| accepted

Answered
second expression and second statement doesn't excuted in else if ?
In an if / elseif / else statement like this: %{ if condition 1 do some calculation 1 elseif condition 2 do some ca...

4 years ago | 0

| accepted

Answered
Displaying exponential notation with num2str?
Another function that might be of interest to you is formattedDisplayText, if you want to capture how the variable would be disp...

4 years ago | 0

Answered
"find" yields different results for linear vs 2D indexing
You don't need to use find. You don't care where the elements that satisfy your criteria are located, all you care about is that...

4 years ago | 1

| accepted

Answered
Calling a Function specific from a ToolBox
The function you indicated you wanted to call is only called in the event that the first input argument is either "a SeriesNetwo...

4 years ago | 0

| accepted

Answered
how to insert same scalar as length of something?
If you want to replicate the scalar in B to be the same size as A, you can use repmat. If you know that B will always be 0, inst...

4 years ago | 0

| accepted

Answered
I got the error of incorrect argument data type or missing argument in call to function 'gamma'.
The gamma function in MATLAB requires its input to be a floating-point number, specifically the input must be "Data Types: singl...

4 years ago | 0

Answered
What could these numbers mean?
This doesn't look related to MATLAB or MathWorks products at all, but this looks like a nonogram.

4 years ago | 0

| accepted

Answered
Using a boolean operation to assign specific values for each threshold
Use the discretize function.

4 years ago | 0

| accepted

Answered
what is wrong in this code not executing .??????Error: File: ifSf.m Line: 2 Column: 22 Invalid expression. Check for missing multiplication operator, missing or unbalanced del
To clarify what @Stephen23 and @Chunru said, when you define a function all the input arguments that you specify must be either ...

4 years ago | 0

Answered
My first user-input prompt is to enter a number (say, x). What should I write if my next message box MUST contain the same number of prompt questions as x?
I'd use a string array. I'm going to hard code the value of n to keep this example simple, but you could query for it using a di...

4 years ago | 1

| accepted

Answered
Can't make .exe file from Appdesigner that include simulink model
See this page from the documentation for Simulink Compiler for an example of how to deploy a standalone application that calls a...

4 years ago | 0

| accepted

Answered
to create a loop to assign names
If you're just using this to obtain the name of the variable in the workspace from which your function was called, use inputname...

4 years ago | 0

Answered
Error using matlab.internal.math.checkDataVariables Invalid grouping variables.
The second input for the groupsummary function as you're calling it should be the name of a variable in your table. "stormData.R...

4 years ago | 0

Answered
How to draw rectangle with coordinate, height and width provided?
You could call the patch function, or if you need to draw a large collection of rectangles you could create one polyshape then u...

4 years ago | 0

Answered
how should i contact my administrator to get my license key?
Go here to see if your college or university has a campus-wide license. If you do I suspect it will be able to tell you how to a...

4 years ago | 0

Answered
Is it possible to adjust the maximum step size ('MaxStep') while an ode15i solver is running according to a certain value?
If you know the times at which you want to change functions and/or initial conditions ahead of time, run ode15i repeatedly for s...

4 years ago | 0

| accepted

Answered
Control other applications using MATLAB
It depends. One relatively easy approach would be if the application you're trying to control has a COM interface you can use in...

4 years ago | 0

Answered
How to input functon arguments without order?
As of release R2021a you could do that by requiring all the inputs to be specified as name-value pair arguments. But if your fun...

4 years ago | 0

| accepted

Answered
How to use MATLAB editor more effectively
What you're describing is the code folding functionality. See the "Fold Code" section on this documentation page for more inform...

4 years ago | 0

| accepted

Answered
Why does not string(f.name) work, f = dir(folder)?
filename = fullfile(matlabroot, 'toolbox', 'matlab', 'elfun', '*.m'); D = dir(filename) s = string({D.name}); Now you can ope...

4 years ago | 1

Answered
Question about different results using PCA and SVD
From the Algorithms section on the pca documentation page: "The pca function imposes a sign convention, forcing the element with...

4 years ago | 1

| accepted

Answered
Is there a more efficient way to format my vector rather than manually change the code by hand
%Time T = 5400; INT = 900; tme = 0:INT:T; %Number of Positions and Impacts Pn = 1320; In = [30, 60, 75,...

4 years ago | 0

| accepted

Answered
How can I make these few lines a function?
If you want all the axes you create going forward to have those property values, consider changing the default property values r...

4 years ago | 0

Answered
how to make something between quotation automatic!
If you're just fitting polynomials you could use polyfit and polyval, specifying n as the third input argument. load census n ...

4 years ago | 0

| accepted

Answered
How and where can I get the clearance permission for using maps generated in MATLAB?
For legal questions like this please create a service request for Customer Service.

4 years ago | 0

Answered
Why is ascii2str not recognized in 2022a?
According to the documentation "The operator ascii2str is supported only in Stateflow® charts that use C as the action language....

4 years ago | 2

Answered
Natural Cubic Spline Interpolation
Set a breakpoint on the first line of your code. Run your program on an example that you (or your textbook) have worked out, ste...

4 years ago | 0

Load more