Answered
For objects in some hierarchy, what is the best practice for parent-child methods/properties that define the relationship? (ALT: is the arm-bone connected to the hand-bone, or vice versa?)
In your hierarchy, do you inherit or compose? In this case composition (having the Forearm object contain a property that isa Ha...

7 years ago | 0

| accepted

Answered
NET.addAssembly is a script, not a function, in MATLAB 2019a
From the error message (specifically the "MATLAB_R2019a.app" part of the path to the NET.addAssembly function) you appear to be ...

7 years ago | 0

| accepted

Answered
test parameters persist after suite ran
If you're using release R2018b or later, you can use external parameters in your parameterized test. I believe that will allow y...

7 years ago | 0

Answered
Replication factors must be a row vector of integers or integer scalars.
If you want to replicate w so it has exactly a elements, I recommend doing two things. Let's operate on some very simple sample ...

7 years ago | 0

Answered
How to fix the missing patches that turn into NAT?
The fillmissing and/or retime functions (retime if you're storing your data as a timetable, fillmissing if your data is a vector...

7 years ago | 0

Answered
second largest peak value
Use the islocalmax function with the 'MaxNumExtrema' option.

7 years ago | 1

Answered
I'm trying to acess Hybrid Electric Vehicle P2 Reference Application in Powertrain Blockset but it is not opening in Matlab?
From the Release Notes it appears that reference application was introduced in release R2018b. The Release you've tagged this po...

7 years ago | 2

Answered
'Out of memory. The likely cause is an infinite recursion within the program.
Guillaume is correct. You've written your own isrow.m that shadows the built-in isrow function. The fileparts function that is ...

7 years ago | 1

| accepted

Answered
Using Property Blocks : Set/get on properties within a single property block
I second some of Jan's suggestions about perhaps packing the properties into a table array (or maybe a struct, vector, or even a...

7 years ago | 1

Answered
Plot against varying index
If you look at the Description section of the plot function documentation page, you're using the fifth syntax for plot: "plot(Y...

7 years ago | 1

Answered
Error function plot with two variables
The fplot function is not the right tool for this job. Its documentation states that when called with one symbolic input it "plo...

7 years ago | 0

Answered
Singular matrix and MATLAB inversion
DON'T use det to determine if a matrix is singular! A non-zero multiple of the identity matrix isn't singular, right? A = 0.1*...

7 years ago | 2

| accepted

Answered
Easy way to change callback function
It sounds like you want to customize the text that appears when you have data cursors enabled, or that's one way you could achie...

7 years ago | 1

Answered
How to make matlab count
If you want the frequency of one particular element from the matrix, use the techniques madhan ravi, Alex Mcaulley, and Star Str...

7 years ago | 1

Answered
Calculate the total average daily load
The retime function requires the first input to be a timetable array. From this line of code: Power_Ah=Dataclean_interpolated.I...

7 years ago | 0

| accepted

Answered
Matlab Novice here - struggling to truncate a column array
If the data is of a fixed with convert it from a cell array containing char vectors into a string array and use extractBetween. ...

7 years ago | 1

| accepted

Answered
timer function is not executing the function i am providing ,please help me with this?
t=timer('timerfcn',ritik,'startdelay',2) This attempts to call the ritik function with 0 input arguments and 1 output argument ...

7 years ago | 0

Answered
How to only collect real part of the cube root
Use the nthroot function. With this you can replace your loop with element-wise operators and process your whole vector of data ...

7 years ago | 1

| accepted

Answered
I need some help with arrayfun
I don't think arrayfun is the tool you want to use here. Instead groupsummary seems like a better fit.

7 years ago | 0

Answered
empty sym: 0-by-1.
Don't pass a char vector into solve. Build a symbolic equation and pass that into solve. syms x b = 0.45; eq = x-sin(x) == b ...

7 years ago | 1

| accepted

Answered
No output in the standalone executable matlab
Symbolic Math Toolbox is an ineligible product for MATLAB Compiler. As stated on that page, "this means that an application or c...

7 years ago | 0

Answered
Integration error - "integrand F must return a single, real-valued vector of the same size as the input" - even when the integrand DOES return such a vector
For what it's worth, when I defined your functions (with lB equal to 1, since you didn't specify a value) and called integral on...

7 years ago | 0

Answered
Using the switch statement inside the for loop.
It's still not really clear, but what I think you want is for your function to infer or deduce which type of problem you're tryi...

7 years ago | 0

Answered
Simulink Onramp does not work
Steps 2 and 3 are not instructions on how to download and install Simulink Onramp. They are instructions for how to use it once ...

7 years ago | 0

Answered
How to delete a rows in a timetable for the rows (dates) that are not trading days?
Don't check each individual element of the timetable array's times individually. Let's make a simple timetable on which to opera...

7 years ago | 0

Answered
Update time/date in a for loop
I would use datetime and string. mydate = 20190606; % Current yearmonthday (8 digits) myrun = 06; % Cur...

7 years ago | 0

| accepted

Answered
Remove non time string values in a time matrix
These don't strike me as being datetime values, they're duration values. The same technique others have suggested (try convertin...

7 years ago | 0

Answered
How to execute and run a external program in matlab?
Agreeing with what others have said, if the external software doesn't provide a programmatic way to run it's likely to be diffic...

7 years ago | 1

| accepted

Answered
could anyone help me how to check the idx position containing value is not equal to zero
a(idx) will give you the elements in a whose linear indices are stored in idx. You can check if they are exactly equal to 0 usin...

7 years ago | 0

Answered
Can someone explain "tol" for me in ismembertol(A,B,tol) to see if I could use it in this context?
ismembertol(A, B) returns an array the same size as A. Each element of the output is true if the corresponding element of A is "...

7 years ago | 2

| accepted

Load more