Answered
Saving data of plotted sine wave into excel file or display on matlab as data (not visual graphs)
Why a mat file first? Why not just write the data to a file using writematrix? writematrix(A,filename) writematrix([t;x]','sin...

5 years ago | 0

| accepted

Answered
How to overlay single data points on bar graph in MATLAB?
Here's an example overlaying a datapoint contianing the mean value. x = categorical({'High PU-High RU','High PU-Low RU', 'Low P...

5 years ago | 1

| accepted

Answered
how can I choose representative days from existing data clusters using kmeans built function?
Sounds like you want kmedoids instead, as that will always use an existing data point as the cluster centroid. From the More Ab...

5 years ago | 0

| accepted

Answered
Creating curved line with given parameters
What about taking the abs of a sin wave? Angle is going to be a function of radius and length, so I consider it a fixed paramete...

5 years ago | 0

| accepted

Answered
DATA NORMALIZATION AND STANDARDIZATION IN ML
I'm pretty certain the app does not do any preprocessing on the data. You will need to apply any preprocessing manually to the d...

5 years ago | 0

Answered
How to create a loop that runs through the rows of a table?
You don't need a for loop for this. P=T{:,1}.*T{:,2}; plot(P)

5 years ago | 0

| accepted

Answered
How to create a callback for radio buttons
Assuming your button has the name app.Button, and your radio buttons are labeled 'Mode1', 'Mode2', and 'Mode3', something like t...

5 years ago | 0

| accepted

Answered
No changes when using function erasePunctuation to remove digits.
erasePunctuation still only erases punctuation, not numbers. The 'digits' specification tells it what type of token to remove pu...

5 years ago | 0

Answered
Why are those lines not drawn?
Check your values again. line(A,D1); appears as expected line(B,D2); is a single point (Both B values are the same, and both D...

5 years ago | 0

Answered
Find speficic string in string
If you don't understand regexpr, like many of us, look at the new Match Pattern functions on this page. They start about halfway...

5 years ago | 0

| accepted

Answered
Index in position 1 exceeds array bounds. IRF plot.
The error has to do with the 1 in oo_.endo_simul(1,:). Check the size of this data. It apparetly has 0 rows.

5 years ago | 0

| accepted

Answered
More versions via mail
The forum will not be able to help you. You'll need to reach out to a sales representative through whatever organization is prov...

5 years ago | 0

Answered
Change interval values of lat and lon
Use the functions xticks and yticks.

5 years ago | 0

Answered
Why am I receiving the error not enough input arguments?
This error means you can created a function with n inputs, but you are calling it with <n inputs. To say for certain, you'll hav...

5 years ago | 0

Answered
If statement indexing in a for loop
I would do this without a for loop. Compute min-columns 7,12,16 Set any values <0 to 0 (you don't have to add to these rows to...

5 years ago | 0

Answered
"error using horzcat demonstrates" Please help
Your code is a bit repetative. You use readtable, but don't capture the results. You then re-load the data one column at a time ...

5 years ago | 0

Answered
Using imported data in an equation
I would create a vector of T1 values, and a vector of the corresponding cp values. I would then compute efficiency using the vec...

5 years ago | 0

| accepted

Answered
Element-wise subtraction of two stem plots to form an array
Subtraction is always elementwise. Your numbers change each time because you are using random numbers d= sqrt(0.04)*randn(siz...

5 years ago | 1

| accepted

Answered
Not sure how to fix error; "Function definitions in a script must appear at end of file". Need them to both work on the same file for publishing purposes.
Any in-file functions must be at the bottom/end of your script. This doesn't mean at the end of the code that uses it. It means ...

5 years ago | 1

Answered
I'm trying to animate both the plots in the 2 for loops simultaneously. But it's getting executed one after the other. Can anyone help me resolve this. I need to get this done. I'm attaching images of plots for your undertanding.
Code executes top down. If you want the plots to update together, you'll have to put the code inside the same for loop. Don't p...

5 years ago | 0

Answered
Newton-Raphson Method
From what I can see, the result of f(x0) keeps cycling between the same set of values, none of which results in your stopping co...

5 years ago | 0

| accepted

Answered
Unable to perform assignment because the size of the left side is 1-by-48 and the size of the right side is 0-by-0. Error in model u(1,:)=2*ON*abs(cns-action);
The error is because the result of this equation is an empty array 2*ON*abs(cns-action) MATLAB expected a vector of 48 values....

5 years ago | 0

Answered
How to add data to an edit field component when a button a pressed in matlab app design
It is possible, but your code will have to do the concatenation. The default behavior is for the new value to replace the curren...

5 years ago | 0

| accepted

Answered
My code is returning complex numbers
The issue is that acos is defined between [-1 1]. When you multiply r by 2, you cause your code to take the acos of numbers >1. ...

5 years ago | 1

Answered
how to use repmat to plot?
You have not specified an x input in your plot command. When you plot just y, the index number of the y value is used as the x v...

5 years ago | 0

Answered
Im getting NaN as output Help pls
The value of x in your while loop keeps getting bigger and bigger. At iter==1610, x = [2.6071; -Inf; -Inf] * 1.0e+30...

5 years ago | 0

Answered
Plot a function of two variables
I think you want to plot a surface rather than a line plot. Use surf with inputs X, Y and z. This will allow you to see the resp...

5 years ago | 0

| accepted

Answered
i need help to solve this error
The backslash has special meaning in MATLAB as an escape character. If you actually want a backslash, you have to use "\\". i=1...

5 years ago | 0

Answered
Finding the elements within a certain range [XMin, XMax] in every column of an array, then converting all the elements of each column within that range to the minimum of that range
Look into indexing into and modifying arrays, logical indexing, and for loops. You can learn about all these topics in MATLAB O...

5 years ago | 0

Load more