Answered
Making combinations using random number generators
If you want to draw with replacement use randi to generate numbers between 1 and the numel of the array you want to sample. Use ...

6 years ago | 0

Answered
Can I use ismember to compare a vector with a matrix
Since you're using release R2019a (which supports implicit expansion) and your data is compatibly sized this is a job for the ==...

6 years ago | 0

Answered
Solving Symbolic system of equations returns incorrect solutions.
MATLAB is solving for a1, a2, and dx in terms of a3. Tell MATLAB you want to solve for a1, a2, and a3 in terms of dx by passing ...

6 years ago | 0

| accepted

Answered
Toolboxes for MATLAB Home License
If you click on the "See available products" button in the first section on the MATLAB Home product page you will see a list of ...

6 years ago | 0

Answered
Upgrade license from individual to "team"
Please contact the Sales department using the telephone icon in the upper-right corner of this page to discuss modification to y...

6 years ago | 0

Answered
compute the approximation of pi
Multiply by 4 after summing the terms not while you're summing the terms. Otherwise the first term will be multiplied by 4 many ...

6 years ago | 1

| accepted

Answered
Error: "First input argument must be a function handle." when taking an integral
Let's step through your code. syms a b n This line is completely unnecessary since you immediately overwrite those variables o...

6 years ago | 0

| accepted

Answered
Fill inside a polygon with a color
Another way to plot and work with this data is to create a polyshape for each region. S = shaperead('lakes.shp'); for k = 1:nu...

6 years ago | 1

Answered
Is it possible to join categorical variables in table according to group variables ?
I'd use findgroups. First let's define the data. x = ["A-00555"; "A-01139"; "B-08811"; "B-00014"; "C-00007"; ... "C-00007...

6 years ago | 0

| accepted

Answered
How can I make this code run faster?
I have some off the top of my head suggestions that come from the structure of the code, but if you explain in words what Disp_I...

6 years ago | 0

Answered
locked output files students can turn in
What information are the students being called upon to provide as the work to be graded? A modified or new app? A script or func...

6 years ago | 0

| accepted

Answered
Rearranging dates to make them suitable for datetime format
If you need to import data in multiple formats, start by trying to import all the data in one of the formats. The entries that c...

6 years ago | 0

Answered
Speed up code - deletion of rows/columns
I'm guessing you're doing this in a loop. In that case consider the old song 99 Bottles of Beer, slightly modified. 99 bott...

6 years ago | 0

Answered
The default interpreter for the 'title' command is 'tex'. How can the default be changed to 'latex'?
There is no way to change the default Interpreter just for axes titles. Axes titles are not their own type of object, they are t...

6 years ago | 2

Answered
YTickLabels repeating themselves?
Not a bug. From the table of uiaxes properties in the documentation, specifically the entry for XTickLabel / YTickLabel / ZTick...

6 years ago | 0

| accepted

Answered
How to calculate mean and std of array full of subarrays?
A = [1, 6; 1, 8; 2, 4; 3, 6; 3, 4; 3, 1]; G = groupsummary(A(:, 2), A(:, 1), {'mean', 'std'}) The first column of A contains t...

6 years ago | 0

| accepted

Answered
I need the results as matrices but in loop please see following
Can you define variables with numbered names like X1, X2, X3, ... ? Yes. Should you do this? Generally we recommend against it....

6 years ago | 0

Answered
How to create a new function file using functions and variables available in base workspace?
If the functions are "big nasty functions" I'm guessing they're symbolic expressions. If so use dsolve to solve symbolically or ...

6 years ago | 0

Answered
Error in HDL Coder- Fixed point conversion "MATLAB expression 'r' is not of the correct class: expected 'double', found 'sym'."
None of the functions from Symbolic Math Toolbox are on the list of functions supported for HDL code generation. I haven't used ...

6 years ago | 0

| accepted

Answered
I tried to run a script with a function, but my function input name show 'the function might be unused'. Please help anyone?
Rather than defining the Fun1 function as a function inside the script hmwk1_problem1a.m I would define it as a regular function...

6 years ago | 0

Answered
Removing time from datetime
If you want to change how it is displayed, change the Format property. >> dt = datetime('now') dt = datetime 23-Au...

6 years ago | 5

| accepted

Answered
Add time to datetime format
A datetime array generally has a time component, even if it's not shown[*]. >> dt = datetime('today') dt = datetime ...

6 years ago | 2

Answered
How i can find the value of c that minimum integration from 0 to 4 x/x-c dx ??
Your question doesn't make sense to me. If you want to specify a value for c then perform that integration, see the "Parameteriz...

6 years ago | 0

Answered
Can MATLAB workspace spreadsheets be updated while in a loop?
As of release R2016a there is a button in the Editor that lets you pause running code and enter debug mode. It may take a little...

6 years ago | 0

Answered
Error in sym: Character vectors and strings in the first argument can only specify a variable or number.
As of release R2018a, calling sym with a char input that is not a valid variable name or a number will error. Modify the code so...

6 years ago | 0

Answered
how to create num2str in a variable
Can you do this? Yes. Should you do this? Generally we recommend against it.

6 years ago | 1

Answered
Is there a way to convert table columns and terms into regular numbers?
You haven't showed us the text of the error, but I'm guessing it was: Error using seconds (line 19) Input data must be a real,...

6 years ago | 0

Answered
Matlab doesn't start(it's installed and activated )
Please contact Technical Support using the telephone icon in the upper-right corner of this page for help with installation and ...

6 years ago | 0

Answered
"LevelList" value setting in "Contourf" drawing mode
As shown in the figure, the proportional array "0,2e+4,2e+8,2e+12,2e+16,2e+20,2e+24,2e+28" is set in "LevelList". Take another ...

6 years ago | 0

Answered
Find maximum value of array within specified range, consecutively
Use the groupsummary function.

6 years ago | 0

Load more