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

Answered
What is this statistical chart called? Is there a corresponding MATLAB command? Thank you
Looking on the Plots tab of the Toolstrip and scrolling down to the Statistics and Machine Learning Toolbox Plots section (assum...

4 years ago | 0

| accepted

Answered
Get datenum to return missing instead of throwing an error
As @Cris LaPierre said, we recommend using datetime instead of datenum. Let's create some example data. t = string(datetime('to...

4 years ago | 1

Answered
Why is the function 'oldInlierLocation' undefined?
You made at least one mistake copying the code from around 4:10 in that video. Your code: if(nnz(isValid>=2)) The video's cod...

4 years ago | 1

| accepted

Answered
Is it not possible to create a web app using matlab 2018 b?
According to the Release Notes Web App Compiler was introduced in MATLAB Compiler in release R2018a.

4 years ago | 0

Answered
Some button in standalone app not working after being compiled (although code working well)
I believe if you launch the application from a system command prompt (Command Prompt on Windows, for example) rather than double...

4 years ago | 0

| accepted

Answered
I don't have acces to the Model Based Systems Engineering for Space-Based Applications template
I don't really understand since I have all modules and latest versions of matlab. Are you certain? Let's check. Run the followi...

4 years ago | 0

Answered
How to find x values from y value in "fit" function?
Set up a sample polynomial fit. x = randn(10, 1); y = (x-1).*(x+1); % polynomial is y = x^2-1 = (x-1)*(x+1) p = fit(x, y, 'po...

4 years ago | 0

Answered
Plotting phase space for 2nd order nonlinear ODE
See this Answers post for an example that sounds like what you want to do.

4 years ago | 0

Answered
How do you make it so that the simplify function displays the correct answer?
syms s simplify((s+30)*(s^2-20*s+200)) expand((s+30)*(s^2-20*s+200))

4 years ago | 1

Answered
Plot all polyshapes in cell array
If you've already created them in a cell array you can simply turn that cell array into an array of polyshape objects and plot t...

4 years ago | 0

Answered
Append indices to vector from container map
Like Walter suggested I'd use a digraph for this sort of operation. You can build a digraph from your containers.Map object. Let...

4 years ago | 1

Answered
Problem Creating Structure Field with For Loop
Do you want the names of the fields in the struct array to be file_name_ followed by a number (file_name_1, file_name_2, etc.)? ...

4 years ago | 0

Answered
adding search path before classdef of derived class
Your class myBase written in the file base.m is not known to MATLAB as myBase. When the name of the class or main function in a ...

4 years ago | 0

| accepted

Answered
Not able to assign a value to a member of class in MATLAB
Your class is a value class rather than a handle class. This documentation page discusses the differences between the two. You'...

4 years ago | 1

| accepted

Answered
Error massage "Execution of script project2 as a function is not supported"
The first input to the VideoWriter function must be the name of the video file you want to write. This could be a hard-coded cha...

4 years ago | 0

Answered
Test to see if a certain message was displayed in the command window
Rather than having the function simply display the error messages I would recommend the function actually throws an error using ...

4 years ago | 0

Answered
Error with pinv in MATLAB r2018a
Searching in the Bug Reports for "svd" in release R2018a found two that look potentially relevant. Bug Report 1768487 is listed...

4 years ago | 0

| accepted

Answered
Remove programmatically added checkboxes and replace them with new checkboxes
Are you sure you want to use an unknown number of checkboxes? If there are a large number of files perhaps a CheckBoxTree (uitre...

4 years ago | 1

Answered
In this code, why did they choose the numbers that they chose?
That doesn't look like a MathWorks example so you might need to ask the author or the person from whom you obtained it, but if I...

4 years ago | 1

Answered
length(data.(ChannelFirst)) this worked for years, now it won't work WHY?
Set an error breakpoint and run your code. When MATLAB stops on that line, show us the output of the following command: whos da...

4 years ago | 0

Answered
Why 2020b is not including toolbox functions to the exe file, even though I have license?
Are you trying to use functionality that is not supported for use with MATLAB Compiler in your application? Which specific func...

4 years ago | 0

Answered
Chaning Background color of disabled text area
Are you developing this using App Designer, GUIDE, or programmatically? If App Designer, do you want to use a uitextarea instea...

4 years ago | 0

Answered
Can someone explain why in this code f3 and f2 are equal to (1048576,2)?
The zeros function creates an array of the specified size where every element is 0. A = zeros(3, 4) % a 3-by-4 array where all ...

4 years ago | 1

Answered
Extract data from sequentially named tables
Based on your code, ladeknecht is a cell array each cell of which contains a struct array. Let's create such a sample object on ...

4 years ago | 1

Answered
Script stuck running forever
One obvious optimization relates to the section of code starting with this comment: %Adding this duplicate line of code so that...

4 years ago | 0

Answered
Faster 2D Interpolation?
How many times are you performing this interpolation? Are the old X and Y coordinates the same each time you perform the interp...

4 years ago | 0

Answered
How to automatically get the axis of a figure in Live Editor?
If you call the function that displays the image with an output argument, you can determine which figure contains that graphics ...

4 years ago | 0

Answered
compute the condition number of a very large sparse matrix
Take a look at the condest function.

4 years ago | 0

Answered
Without using randi inbuilt function
We don't distribute the source code for the randi built-in function. If you want to see it, start here.

4 years ago | 1

Load more