Answered
Automatically take folder directories of one level up
You can specify the full path to the directories you want to open rather than changing the directory that MATLAB is running in. ...

5 years ago | 0

Answered
Multiply/divided two tables
% suppose you have a table T1 and T2 you could do something like A = [T1.myColumnName1 T1.myColumnName2] B = [T2.myColumnName...

5 years ago | 0

Answered
How to unit test several different functions that take the same input arguments efficiently?
Here are a couple of possibilities You can pass function handles, and then make the function you are testing be one of the argu...

5 years ago | 0

Answered
For loop data extraction
You overwrite your t and soln values with each loop iteration. If you want to save those to use them later you need to put them ...

5 years ago | 1

Answered
How to read a specefic column of several xls file and create a matrix
The readmatrix function can be used to read in the.Use the range option to specify the column you want from each .xls file. Type...

5 years ago | 1

| accepted

Answered
Why do I keep getting this error message? Error using ./ Matrix dimensions must agree.
I can run your code without getting any error messages. Can you please be more specific about how to reproduce the error. Also w...

5 years ago | 0

Answered
How to format this Loop?
In your code above x and y are the same they are both assigned to Data(d,:) do you mean to have? x = Data(d,:); y ...

5 years ago | 0

| accepted

Answered
Phase Angle in Vortex-Induced Vibrations
If you have phase angle values theta and velocity values v you can just plot plot(v,theta) If you are asking how do you calcu...

5 years ago | 0

Answered
Polyfit returns the wrong correlation coeffcient when I try do a linear regression
I don't think you are plotting your fitted y values For example where you have fFMA = polyval(pFMA,subwFMA(:)); ...

5 years ago | 0

| accepted

Answered
How to make matlab show line of error in appdesigner
I see in the documentation that "stack is an N-by-1 struct array, where N represents the depth of the call stack" Is it possibl...

5 years ago | 0

| accepted

Answered
How to find unknown parameters from experimental data fitted to an equation?
If you have the Optimization Toolbox you can use the function lsqcurvefit for solving this problem. Type doc lsqcurvefit on your...

5 years ago | 0

| accepted

Answered
Real and Imaginary element Separation from square matrix and stacking into a vector
D = diag(A) L = triu(A,1) U = tril(A,-1) [D; real(U(:)); real(L(:))] is close but you still have zero elements in L and U to...

5 years ago | 1

| accepted

Answered
Why does the MATLAB plot show up with no function on it?
Your plot limits are outside of the range of the data. Also you don't have enough (or any data points) in the range of x that ...

5 years ago | 0

Answered
Continuous to Discrete time signal
You should just evaluate and save your values x_t once Then to get your discrete samples (assuming the discrete sample interva...

5 years ago | 0

Answered
How do i make plot like this?
You must first make a matlab function or script to evaluate your y(x) and then plot your values So something like % define con...

5 years ago | 0

| accepted

Answered
how to compare previous and next values in MATLAB?
You need to create a new variable, call it for example prevB. After each loop set prevB = B when you do your comparison compar...

5 years ago | 0

Answered
How do I create an array with the greatest values from two arrays?
C = max(A,B)

5 years ago | 0

| accepted

Answered
Extract columns from matrix based on a vectors values
I think this should do it for you: C = A(:,B)

5 years ago | 0

| accepted

Answered
create csv files by extracting data from a starting csv file
Without knowing all of the details of what is in your files it is hard to give a specific answer. However for general advice I w...

5 years ago | 0

Answered
Minimalizing mean absolute error through optimisation?
You should be able to frame this as a linear programming problem which can be solved using MATLAB's linprog function.

5 years ago | 0

Answered
How to define RDT function in Matlab?
You need to call the function with its arguments. You just typed rdt on the command line. You must first assign the variables y...

5 years ago | 1

Question


How to ensemble average with periodic inputs using System ID toolbox?
I am using the System Identification Toolbox. In general, one advantage of using periodic input signals, such as PRBS, is the po...

5 years ago | 0 answers | 0

0

answers

Answered
Function Finds the Prime Factorization of An Integer Greater than 1
The matlab factor command does it one line. But maybe you have to do it yourself for a homework exercise? For example f = facto...

5 years ago | 0

| accepted

Answered
Find a number inside a matrix
There are probably more efficient ways to do this but one approach would be to utilize MATLAB's find function. If your matrix ...

5 years ago | 0

Answered
try ,catch, and continue commands in for loop, and storing for loop data in a matrix
It looks like you never assign C{k} unless there is an error. Maybe you should assign C{k} after the end statement that end the ...

5 years ago | 0

Answered
more non-singleton rhs dimensions
I'm thinking that you want to loop through your t values. You first assign t to the vector [30,60,90,120,150] but then reassign ...

5 years ago | 0

| accepted

Answered
Plotting using a for loop
You need to save your values to a vector you are just replacing a single scalar value

5 years ago | 0

Answered
Matrix dimensions must agree
Use strcmp for example if strcmp(Caso,'isotermico') A switch case expression can also be used nicely for this switch Caso ...

5 years ago | 0

| accepted

Answered
Why am I able to leave out the right-most arguments in a call to a function that doesn't need them under certain circumstances?
This is a feature. As long as you don't do a calculation within the function that needs the missing variables it will not throw ...

5 years ago | 0

| accepted

Answered
EXTRACT TABLE FROM DATA
You may have a different number of columns each time through the loop. You can't just stack them on top of each other if they d...

5 years ago | 0

| accepted

Load more