Answered

How to plot 3D surface from 2D array?

There is also a MATLAB function called streamtube https://www.mathworks.com/help/matlab/ref/streamtube.html which seems closely ...

How to plot 3D surface from 2D array?

There is also a MATLAB function called streamtube https://www.mathworks.com/help/matlab/ref/streamtube.html which seems closely ...

25 days ago | 0

Answered

how i can import specific rows from excel and than use that row in equations MATLAB .

You can use the matlab command readmatrix to get the data in from Excel (type doc readmatrix on the command line for details) T...

how i can import specific rows from excel and than use that row in equations MATLAB .

You can use the matlab command readmatrix to get the data in from Excel (type doc readmatrix on the command line for details) T...

26 days ago | 0

Answered

discontinuous x axis plot

I don't think there is a MATLAB command for this but there are many file exchange submissions that should help you https://www....

discontinuous x axis plot

I don't think there is a MATLAB command for this but there are many file exchange submissions that should help you https://www....

26 days ago | 0

Answered

Solving simultatious equations with inequalities

If you have the optimization toolbox you can use fmincon for this. Please type doc fmincon on the command line for further detai...

Solving simultatious equations with inequalities

If you have the optimization toolbox you can use fmincon for this. Please type doc fmincon on the command line for further detai...

26 days ago | 0

| accepted

Answered

Add data to .csv file using matlab

In MATLAB put the data into a table array. Then use writetable with the 'WriteMode','Append' property value pair. Please see htt...

Add data to .csv file using matlab

In MATLAB put the data into a table array. Then use writetable with the 'WriteMode','Append' property value pair. Please see htt...

26 days ago | 0

Answered

How to sort based on two columns

You should be able to use sortrows for this. Please type doc sortrows on the command line for further documentation

How to sort based on two columns

You should be able to use sortrows for this. Please type doc sortrows on the command line for further documentation

26 days ago | 0

Answered

While loop not working in MATLAB app designer callback function

You probably have a scoping issue. Shared values are typically stored variable names such as app.myVariable To give any more sp...

While loop not working in MATLAB app designer callback function

You probably have a scoping issue. Shared values are typically stored variable names such as app.myVariable To give any more sp...

29 days ago | 0

Answered

Create a series of vector with different name

I would suggest rather than naming your subvectors, you reorganize your data to put it into a matrix where each column is one of...

Create a series of vector with different name

I would suggest rather than naming your subvectors, you reorganize your data to put it into a matrix where each column is one of...

1 month ago | 0

Answered

Deconvolution of a polynomial and exponential function

Your overview of what you are trying to do is helpful, but I think a lot more details are needed to help with the MATLAB impleme...

Deconvolution of a polynomial and exponential function

Your overview of what you are trying to do is helpful, but I think a lot more details are needed to help with the MATLAB impleme...

1 month ago | 0

Answered

While loop word problem

You will need to add the details but you probably want to do something like this % set some parameters runHours = 12; % number...

While loop word problem

You will need to add the details but you probably want to do something like this % set some parameters runHours = 12; % number...

1 month ago | 0

| accepted

Answered

What else can I do to speed up evaluation of this function?

You can get determine where you are spending time using MATLAB's profiler https://www.mathworks.com/help/matlab/matlab_prog/prof...

What else can I do to speed up evaluation of this function?

You can get determine where you are spending time using MATLAB's profiler https://www.mathworks.com/help/matlab/matlab_prog/prof...

1 month ago | 1

| accepted

Answered

How do i make a uipanel with checkboxes return information to my script?

I have attached a modified script to generate your ui, which I have called checkboxGo. Note that in this I have used a simple l...

How do i make a uipanel with checkboxes return information to my script?

I have attached a modified script to generate your ui, which I have called checkboxGo. Note that in this I have used a simple l...

1 month ago | 0

| accepted

Answered

How to run 2 scrips simultaneously, one for sending output to lab equipment and one for reading sensor output.

I'm not sure about licensing restrictions, but in Windows (probably similar for other OS) you can right click on the MATLAB ico...

How to run 2 scrips simultaneously, one for sending output to lab equipment and one for reading sensor output.

I'm not sure about licensing restrictions, but in Windows (probably similar for other OS) you can right click on the MATLAB ico...

1 month ago | 0

Answered

How can i get the control effort/output of the PID?

So I see you are on the right track, you are trying to define the appropriate closed loop transfer functions but using MATLAB's ...

How can i get the control effort/output of the PID?

So I see you are on the right track, you are trying to define the appropriate closed loop transfer functions but using MATLAB's ...

1 month ago | 0

| accepted

Answered

How to plot multiple graph

I don't have the symbolic toolbox, but I could get your code to work by modifying as follows. Note I did not include the line sy...

How to plot multiple graph

I don't have the symbolic toolbox, but I could get your code to work by modifying as follows. Note I did not include the line sy...

1 month ago | 0

Answered

Unrecognized function or variable 'FirstDerivative'

It looks like you are either missing the function FirstDerivative or maybe it is in a directory somewhere but that location is ...

Unrecognized function or variable 'FirstDerivative'

It looks like you are either missing the function FirstDerivative or maybe it is in a directory somewhere but that location is ...

1 month ago | 1

| accepted

Answered

How to find x and y component of a vector

Yes I think you should be able to recover the x and y components using the real and imaginary parts, that is using MATLAB's real...

How to find x and y component of a vector

Yes I think you should be able to recover the x and y components using the real and imaginary parts, that is using MATLAB's real...

1 month ago | 0

| accepted

Answered

How can i work with a matrix that present floating points

I don't think the problem is float versus integer. MATLAB is very forgiving on this. Are you sure that your bat_N values are neg...

How can i work with a matrix that present floating points

I don't think the problem is float versus integer. MATLAB is very forgiving on this. Are you sure that your bat_N values are neg...

1 month ago | 0

Answered

RMSD between two signals

Looking at your variables in the workspace I see the signals probeWith and probeWithout. Each arrays with two columns. I assume ...

RMSD between two signals

Looking at your variables in the workspace I see the signals probeWith and probeWithout. Each arrays with two columns. I assume ...

1 month ago | 0

Answered

Real Time Plotting in Gui by taking data from Simulink

One way to do this is using get_param to get data from run time objects Please see https://www.mathworks.com/help/simulink/ug/...

Real Time Plotting in Gui by taking data from Simulink

One way to do this is using get_param to get data from run time objects Please see https://www.mathworks.com/help/simulink/ug/...

1 month ago | 0

Answered

How can I solve a linear system of equation Ax=b where A and b are changing in a for loop

You could do it like this: % preallocate arrays to hold results x = zeros(9,360); A = zeros(9,9,360); b = zeros(9,1,360); ...

How can I solve a linear system of equation Ax=b where A and b are changing in a for loop

You could do it like this: % preallocate arrays to hold results x = zeros(9,360); A = zeros(9,9,360); b = zeros(9,1,360); ...

2 months ago | 1

| accepted

Answered

pulse disturbance signal generator

How are you running your simulation? Is it in Simulink? In Simulink you can use a From Workspace block to create an arbitrary s...

pulse disturbance signal generator

How are you running your simulation? Is it in Simulink? In Simulink you can use a From Workspace block to create an arbitrary s...

2 months ago | 0

| accepted

Answered

Recursive Forecast with VAR Model

You could do it in a loop something like this (I'm assuming the ith forecast value is a scalar, otherwise you may have to adjust...

Recursive Forecast with VAR Model

You could do it in a loop something like this (I'm assuming the ith forecast value is a scalar, otherwise you may have to adjust...

2 months ago | 0

Answered

How to Add Headings to a list of data

In general, MATLAB doesn't provide for column or row labels for matrices. You could put the array into a MATLAB table and label...

How to Add Headings to a list of data

In general, MATLAB doesn't provide for column or row labels for matrices. You could put the array into a MATLAB table and label...

2 months ago | 0

Answered

Problem to read csv file with a blank line

You should be able to use the headerlines property value pair in your call to readtable to skip the first 5 lines something like...

Problem to read csv file with a blank line

You should be able to use the headerlines property value pair in your call to readtable to skip the first 5 lines something like...

2 months ago | 0

Answered

while loops , error in use of the word else and else

At least one problem you have is in the loop: while fluid_volume <= (tank_volume_max - v_tol ) Fluid_height = fluid_height...

while loops , error in use of the word else and else

At least one problem you have is in the loop: while fluid_volume <= (tank_volume_max - v_tol ) Fluid_height = fluid_height...

2 months ago | 0

Answered

Bode plot obtained from measured data is different from that obtained from transfer function

There are a number of problems with your problem formulation. I think the primary one may be that your system, as defined, is u...

Bode plot obtained from measured data is different from that obtained from transfer function

There are a number of problems with your problem formulation. I think the primary one may be that your system, as defined, is u...

2 months ago | 0

Answered

How to make a 3D Matrix

You can also do it like this, for example for a 2 by 4 by 3 A = ones(2,4,3).*reshape(1:3,1,1,3)

How to make a 3D Matrix

You can also do it like this, for example for a 2 by 4 by 3 A = ones(2,4,3).*reshape(1:3,1,1,3)

2 months ago | 1

| accepted

Answered

checking the existence of timetable and merge

If it is a question of whether the variables have been created at all, you can check whether they exist using the exist MATLAB c...

checking the existence of timetable and merge

If it is a question of whether the variables have been created at all, you can check whether they exist using the exist MATLAB c...

2 months ago | 0

Answered

How I finish a recursive function?

In your recursive function there must finally be a branch where you encounter a return. Once it hits this return, it will back ...

How I finish a recursive function?

In your recursive function there must finally be a branch where you encounter a return. Once it hits this return, it will back ...

2 months ago | 0