Answered
I am trying to disallow the user from inputting non-sense answers.
You are missing at least one check. In addition, since the code that gets executed if any of your if statements are satisfied th...

3 years ago | 0

Answered
How to fix anomalies in graphs
It looks like you may be calling plot with x data that is not sorted. Compare plotting a sine curve with sorted data: x = 0:360...

3 years ago | 1

| accepted

Answered
distributionFitter: Lognormal distribution
I am pretty sure that the data and the frequency arrays are positive (>=0). 0 is not positive. What does this command show? a...

3 years ago | 1

| accepted

Answered
i want to guide edit output has number+text
Like this? z = uicontrol(Style="edit"); n = 25; z.String = string(n*1j);

3 years ago | 0

Answered
Matlab file MAC - Script Error
Did you already have a copy of the file in the directory to which you downloaded? I'm not sure if Mac behaves the same way as Wi...

3 years ago | 1

Answered
Calculations wrong in appdesigner
Result should be 315.5 but is not?? So what is it if it's not 315.5? Since you said this is part of an app my guess is that on...

3 years ago | 0

Answered
Output of values via a callback function
For this particular question you could addpoints to an animatedline inside the callback function. Each press of the button callb...

3 years ago | 1

Answered
Error using feval Function to evaluate must be represented as a string scalar, character vector, or function_handle object.
Another approach, if you don't want to work symbolically as @Walter Roberson did, is to create an anonymous function. All I need...

3 years ago | 1

| accepted

Answered
Using accumarray for histcounts2 with >1024 bins in 1 dimension
MATLAB limits the number of bins if you specify BinWidth. If you specify a list of edges MATLAB will use that list of edges to d...

3 years ago | 0

| accepted

Answered
For very long solution result Workspace doesn't show the full answer
Rather than trying to read 100 pages of text, a couple of options that may suit your needs: call the ccode function convert th...

3 years ago | 0

Answered
Matlab built-in function not identified
According to a search there are several different functions named coefTest in Statistics and Machine Learning Toolbox. From a qu...

3 years ago | 0

Answered
How to solve: Limits must be a 2-element vector of increasing numeric values.
Let's look at a couple sections of your code. I'm going to comment out the function declaration line so I can run this in Answer...

3 years ago | 0

Answered
How to plot binned data from a table?
Take a look at the "Aggregate Timetable Data and Calculate Mean Values" example on the retime documentation page.

3 years ago | 0

Answered
Question about toolbox dependencies
The behavior you described for iqr is not a bug. The Version History on the documentation page for the iqr function in MATLAB f...

3 years ago | 0

| accepted

Answered
Add suffix to name of all variables in workspace
Can you dynamically create variables with patterned names like a_test, b_test, c_test, etc.? Yes. Should you do this? The gener...

3 years ago | 0

| accepted

Answered
How to round values of table with mixed types?
Using a sample table: Temp = [37.3;39.1;42.3]; Pressure = [30.1;30.03;29.9]; WindSpeed = [13.4;6.5;7.3]; WindDirection = cat...

3 years ago | 0

Answered
What is an LAPACK loading error when using polyfit?
There are two Bug Reports that look potentially relevant to this situation. One was fixed in release R2014b and the other in rel...

3 years ago | 0

Answered
How to create a datetime array in C++
The datetime function supports the Extended Capability of C/C++ Code Generation (with some limitations listed on its documentati...

3 years ago | 1

| accepted

Answered
Time and Space Efficiency Problem in Multi-Format .csv file Splicing and Saving
Assuming your data files don't have any header rows, I'd consider avoiding the read/save process and just use operating system c...

3 years ago | 0

| accepted

Answered
How to read the result of fprintf
ID = 42; fprintf('set %d\n', ID); When called with that syntax, fprintf does not write to a file. It writes to the Command Win...

3 years ago | 0

Answered
Inquiry about companies using Matlab for motor controller design of EVs powertrain
You could search the customer stories for stories about electric vehicles and motor control.

3 years ago | 0

Answered
numerical integration inf to inf
Look at your function over the region in question. e=0.01; f= @(x) 1./sqrt((1-x.^2)+(e/2)*(1-x.^4)); a=-1; b=1; fplot(f, [-...

3 years ago | 0

Answered
Viewing Symbolic Matrix Entries in Variable Tab?
If you're planning to use the symbolic expression in a loop you may want to create a MATLAB function file from it using matlabFu...

3 years ago | 1

Answered
Grey Wolf optimizer in matlab
The ability to define local functions in scripts was introduced in release R2016b.

3 years ago | 0

| accepted

Answered
App designer: How to define self-referring properties?
That code does not define a variable named x. It defines an object property named x. You're assuming that defining one property...

3 years ago | 1

| accepted

Answered
rng usability missing seed functionality
It looks like using "seeds" is being considered "old fashioned" in Matlab 2022b, and there is a warning about it suggesting it w...

3 years ago | 0

| accepted

Answered
How do I use matlab.uitest.TestCase to open my app once and perform multple function tests?
You could do this by opening your app in a TestClassSetup method and storing a handle to it in a property of your test class, bu...

3 years ago | 1

| accepted

Answered
How can I access the following builtin function code? [L,p] = chol(A,'lower')
We don't distribute the source code for the built-in chol function.

3 years ago | 0

| accepted

Answered
Trying to Increase efficiency by avoiding using If statements to select data
Can you dynamically create and access variables with numbered names like x1, x2, x3, etc. or similar names like L_Data and R_Dat...

3 years ago | 0

Answered
Is Home version an annual-basis or one-time purchase?
For your first question does the MATLAB Home product page (and the FAQ at the end of that page) provide you with sufficient info...

3 years ago | 0

| accepted

Load more