Question

Saving variables in a function

Hi everyone, I am calling this function where I get in output the time t and the matrix y: function [ dy ] = greitzer( t,y,P)...

10 days ago | 1 answer | 0

Question

help for a loop, switching vectors and stuff

Hi everyone, I wrote this 3 codes, ciclo_1 loads z_matllab_1.mat which is a file with: phi_10_1 t_10_1 z_general_1 A...

12 days ago | 0 answers | 0

Question

Error in a ODE in a loop (returns a vector of length 9, but the length of initial conditions vector is 2)

Hi everybody, and thanks again for the help. I run the file ciclo_1_bis, which loads from the file z_matlab_1 different vectors...

23 days ago | 1 answer | 0

Question

Cell-Matrix, I can't extract values

I have the figure in attached and I need to extract values. I run this code: F = openfig('phi_1.fig'); ax = gca; lines = fin...

2 months ago | 1 answer | 0

Question

storing variables after a loop (easy)

Hi, I managed to make a loop in wich I run a function. The expected outputs are: t,y(:,1),y(:,2) The problem is that at the ...

2 months ago | 1 answer | 0

Question

ode in a for loop updating initial conditions

I created the files in attached, main and @greitzer (function). In main I call the function in @greitzer. Now I would like to...

2 months ago | 0 answers | 0

Question

Simple For cycle (a small problem with the indexes)

I have a small problem with the last loop in the code: clear clc close all load matlab_10.mat init= 24500; %% Gas prop...

2 months ago | 1 answer | 0

Question

Find intersection between two llines

Hi everyone, I need to find the exact intersection between the vectors m_compressor and mass_flow_corrected. clear clc clos...

2 months ago | 1 answer | 0

Question

changing a variable in an equation

Hi, I wrote this little piece of code to evaluate mass_flow I then find out I have mass_flow, and I need to evaluate ER. Is...

3 months ago | 0 answers | 0

Question

Plotting in a GUI

Hi, I am new to GUI, I did my first program but now I am stuck in plotting the results. I'd like to plot the results I get from...

4 months ago | 1 answer | 0

Answered

problem at 50Hz!

this is the solution I was looking for: init=[0 0]'; options= odeset('MaxStep',0.001); %maximum time-step size [t,y]=ode45(@...

problem at 50Hz!

this is the solution I was looking for: init=[0 0]'; options= odeset('MaxStep',0.001); %maximum time-step size [t,y]=ode45(@...

4 months ago | 0

| accepted

Question

problem at 50Hz!

Hello everyone, I have the 3 files in attached, first run mappa_jerzak to load the parameters, then main_jerzak to call the fu...

4 months ago | 2 answers | 0

Question

Help in writing a function

Hi everyone, I need to write a function to solve this system: Until now all I can came up with was: function dz = control...

4 months ago | 1 answer | 0

Question

Problem with a function

Hello everyone, I wrote this function: function dz = nocontrol(v,z,parameters) gammaT=??????????; phi_0 =0.6; psi_0 =0.685...

4 months ago | 1 answer | 0

Question

Add a legend in a plot with multiples lines

Hi, I am having a small probllem in adding a legend, I just can't get all the names for different frequencies: clear all; cl...

4 months ago | 2 answers | 0

Question

from Hz to radiant

Hi everyone, this is a simple one. Is the argument coorrect in this code? gammaT_max = 0.8; gammaT_min = 0.65; f=50;%hz w=f...

4 months ago | 1 answer | 0

Question

taking samples from a vector

I have the vector psi. It has too many items and I cannot copy and paste the values in a txt file to plot a graph in Latex. Wou...

5 months ago | 1 answer | 0

Question

finding the error between two curves from a fig

I have a fig, the onee in attaced (example). Considering the green one the true value, how can I evaluete the error of the seco...

7 months ago | 1 answer | 0

Question

finding elements in a vector from another vector

I'd like to create a vector y with the positions of the elements of x in m. i.e. x=0 (first element of x) has and index of 1 i...

7 months ago | 2 answers | 0

Question

extracting only real numbers (not real part) from a vector

I have these 2 vector, phi, and psi. both have complex number from the 1st to 4864th element, then from 4865th to the last real...

7 months ago | 1 answer | 0

Question

Paid task, let's talk about it.

Has anyone of you ever asked for help and paid? I was asked some money and a bit worry of getting scammed. Any opinions or pas...

8 months ago | 1 answer | 0

Question

iteration with for for a simple computation

I'd like do write this expression in a more compact and generic way, like with a for: T = c(1)*cos(0) + c(2).*cos(1.*acos((m)))...

8 months ago | 1 answer | 0

Answered

polynomial evaluation for a simple curve.

formula = ((x.^4)*-35.4628) + ((x.^3)*39.9257) + ((x.^2)*-14.8278) + ((x.^1)*1.6022) + ((x.^0)*1.1031);

polynomial evaluation for a simple curve.

formula = ((x.^4)*-35.4628) + ((x.^3)*39.9257) + ((x.^2)*-14.8278) + ((x.^1)*1.6022) + ((x.^0)*1.1031);

8 months ago | 0

| accepted

Question

polynomial evaluation for a simple curve.

After I got the coefficent from the command: p1=polyfit(x,y,4); the p1 vector is: p1 = -35.4628 39.9257 -14.8278 1...

8 months ago | 1 answer | 0

Question

vector multiplied a matrix

Hi, I need this multiplication and I can't whats wrong f=c.*T where c and T are the attached files. so I expect a raw vector ...

9 months ago | 2 answers | 0

Question

multiplying vectors (easy one!)

Sorry guys, an easy question: how do I evaluete this function in the interval x=[-0.2,0.8] the function is f = 2.2785*T_0(x) ...

9 months ago | 1 answer | 0

Answered

Chebishev polynomials, don't know how to use "chebpoly"

Can anyone help me on how to find T_i and T_j?

Chebishev polynomials, don't know how to use "chebpoly"

Can anyone help me on how to find T_i and T_j?

9 months ago | 0

Answered

Chebishev polynomials, don't know how to use "chebpoly"

maybe this can help By Chebyshev points we shall mean the set of points in [−1,1] defined by xj=−cos(jπ/N), 0≤j≤N, where N≥...

Chebishev polynomials, don't know how to use "chebpoly"

maybe this can help By Chebyshev points we shall mean the set of points in [−1,1] defined by xj=−cos(jπ/N), 0≤j≤N, where N≥...

10 months ago | 0

Question

Chebishev polynomials, don't know how to use "chebpoly"

I wrote the following code to approximate a 2 variables function: clear clc close all FlowMeasurements = chebpts(5,[-0.2,0...

10 months ago | 2 answers | 0

Question

Getting coefficient from a chebfun (chebcoeffs2-chebpoly)

I worte the following code to get an apprroximation of a compressor map: clear clc close all FlowMeasurements = c...

10 months ago | 0 answers | 0