Answered
Why does lu function yield different lower triangle matrix if I return [L,U] rather than [L, U, P]?
From the documentation page for the lu function: "[L,U] = lu(A) returns an upper triangular matrix U and a matrix L, such that ...

4 years ago | 0

Answered
Readtable is not reading my delimiter and datetime columns correctly
You might want to use the interactive Import Tool to read in your data. This will let you select how the data is delimited / sep...

4 years ago | 0

Answered
Performing calculations for specific values in a table defined by certain values from another column (Date)
Since you have time-based data I'd store it in a timetable array instead of a table array. If you do, you can use retime to aggr...

4 years ago | 1

Answered
How can i display a vector on Matlab that does the follwing
I suspect this may be part of a homework assignment so I'm not going to give you the answer. But I believe the section on "Vecto...

4 years ago | 0

Answered
readtable() custom variable names
If you're using release R2020a or later I would use the renamevars function.

4 years ago | 0

Answered
Function inside the function
r=@(s,z) sqrt((s+s0).^2+(z+z0).^2); I'm assuming you've defined s0 and z0 before you run this line to define r. Ds=@(r,s)(c0x+...

4 years ago | 1

Answered
Extend a cell array of dates (from days only, to hours and days) in a compact way
I'd probably take advantage of implicit expansion for datetime and duration arrays, introduced for those types in release R2020b...

4 years ago | 0

Answered
Is there an official page that gives the MATLAB and associated/compatible Simulink version numbers ?
Since you're asking about compatibility, version numbers are not the right tool to use. The supported workflow is to use the ver...

4 years ago | 0

Answered
Can I define a specific method to run upon loading obj from mat file?
From the documentation section talking about how to customize object saving and loading, overload the loadobj method.

4 years ago | 0

Answered
How to calculate inverse of 3d array matrices with size 3*3*18 ?
If you're using release R2022a or later you could use the pageinv function. But if you're planning to invert these matrices in o...

4 years ago | 1

Answered
Dear Sir,There are only limited options or tools in trial version of librarires of R2022a trial version
I suspect that most if not all of the blocks you're trying to use are part of Simscape Electrical. Check the output of the ver f...

4 years ago | 0

Answered
How to save figures using mkdir if paths are variables?
Functions in MATLAB that accept text data can be called in one of two ways: command form or function form. Let me show you each ...

4 years ago | 1

| accepted

Answered
Using stem plot for two plots
This looks like a reasonable plot to me. T=4e-3; n=21; x=linspace(0,T/2,2001); x1=linspace(T/2,T,2001); y=sin(pi*x/T); y1=(...

4 years ago | 0

Answered
using same variable for two separate button to run and show the output
There's no variable named t in the workspace of the plotButtonPushed function. If you had used app.t in that code, that would r...

4 years ago | 0

Answered
Moving Average with Variable Window Size
See the "Sample Points for Moving Average" example in the documentation page for movmean. While that example has uniformly space...

4 years ago | 1

| accepted

Answered
Phase Portrait of ODE system
You could use ode45 with the 'OutputFcn' option set to @odephas2 using odeset, as shown in this Answers post.

4 years ago | 0

Answered
Which file Matlab selects if two different files with the same name are put under two folders, which are both added via addpath?
See this documentation page for a discussion of the function precedence order.

4 years ago | 0

Answered
Matlab plot3 not giving a 3D plot
Since no axes existed when you called hold on, MATLAB created one using the default 2-D view and "locked" that axes property in ...

4 years ago | 1

| accepted

Answered
Mean and Median of Values in a matrix
Take a look at the groupsummary function.

4 years ago | 0

Answered
Error using crossvalind (line 131) Not a valid method.
According to the documentation page for crossvalind the value of the first input (listed as cvMethod on that page) that selects ...

4 years ago | 0

Answered
Computing mean by group (need help with speed!)
Since this question was asked (in release R2018b) we introduced the grouptransform function. I believe using the 'meancenter' me...

4 years ago | 0

Answered
Create structure from string name / Rename structure from string name
Use a fixed name for your struct and user-specified names for the fields, then when you save it use the -struct option. Let's ge...

4 years ago | 2

| accepted

Answered
creating a Dummy variable from a string vector
Use the string manipulation and/or set membership functions. Let's start with a random set of names: rng default D = ["Doc"; "...

4 years ago | 0

Answered
Data type of UIAxes change in R2022a?
I'm not certain offhand but I suspect that's a consequence of the changes made in release R2020b.

4 years ago | 0

| accepted

Answered
which my mistake erro
I suspect that you want those last two lines to be: [Efmax,Iter]= max(Ef); I2me=I2(Iter); in order to set I2me to the value o...

4 years ago | 1

Answered
what versions of matlab can work with the ROS toolbox
According to the second page of the Robotics System Toolbox User's Guide PDF file, version 1.0 of this toolbox was released as p...

4 years ago | 0

Answered
How do I view the properties of an abstract class?
Call the properties function with the name of the Abstract class as input. >> properties AbstractClassDemo Properties for clas...

4 years ago | 0

| accepted

Answered
Patenting a Matlab script
You're unlikely to get a definitive answer to a legal question, especially a very broad one like this one, here on MATLAB Answer...

4 years ago | 2

| accepted

Answered
Output argument "name of variable" (and possibly others) not assigned a value in the execution with "function name" function. Can someone explain what this means?
Another common cause of this error is that the function contains at least one code path on which the output variable is defined ...

4 years ago | 0

| accepted

Answered
using Repmat function , obtain repeated specific values
Use repelem. a = [1 2 3 4] b = a.^2 c = repelem(b, a)

4 years ago | 0

| accepted

Load more