Respondida
Hey can someone have a look at this for me?
Hi, summary is a predefined Matlab function which works on tables. This causes problems. Choose another name for your function....

más de 7 años hace | 1

| aceptada

Respondida
help me to find max :((
Hi, two steps. Symbolic finding the derivatives and then calculate numeric over the functions you got. syms x y; f(x) = (2.*...

más de 7 años hace | 0

| aceptada

Respondida
how to create this matrix?
Hi, do you want a square matrix? Is the calculation correct without any brackets? My calculation follows the way you wrote the ...

más de 7 años hace | 0

Respondida
Creating a matrix one row at a time
See this example: y = [1 2 3]; A=zeros(3) for k = 1:3 y = k.*y; A(k,:)=y end Best regards Stephan

más de 7 años hace | 0

| aceptada

Respondida
how can i get the maximum value in the signal in simulink ?
Hi, link your signal to a minMaxResetTable: See also this example in the documentation. Best regards Stephan

más de 7 años hace | 0

| aceptada

Respondida
How do I change the number of variables in a custom equation in the curve fitting tool?
Hi, if you work with only x and y just leave z out. Best regards Stephan

más de 7 años hace | 0

| aceptada

Respondida
Import .csv file using simulink, reading the entry and storing in variable and update the variable with new entry every 0.1s
Hi, you could use the from file block in Simulink. The attached .mat-file contains your data converted to a timeseries object, ...

más de 7 años hace | 0

Respondida
How to solve Vertcat error to PID graph?
Hi, try: kd=input('enter the value of kd'); kp=input('enter the value of kp'); ki=input('enter the value of ki'); T1=tf([25...

más de 7 años hace | 0

Respondida
Extracting specific numerical data from array
t = A(A>=24*60 & A<25*60);

más de 7 años hace | 0

| aceptada

Respondida
I need to solve for beta please help me
Hi, use: syms b eqn1 = b*exp((b)^2)*erf(b)==(1000*(383.15-373.15))/(1000*(3.14)^(1/2)); res = vpasolve(eqn1,b) Maybe '3.14'...

más de 7 años hace | 0

| aceptada

Respondida
Is there anyone to help me for Lagrange multipliers method?
Hi, your result is correct. Here is an alternative solution using lagrange multiplier: syms l b h lambda A = l * b + 2 * b * ...

más de 7 años hace | 10

| aceptada

Respondida
Solving an optimization problem with several functions
Hi, one way to solve this is fsolve: format long x0 = [1 1 1 1 1]; options = optimoptions('fsolve', 'Algorithm', 'Levenberg-...

más de 7 años hace | 0

| aceptada

Respondida
How to transform a 2x5184 data set
Hi, here is a small example - change k to 72 to adapt for your case: k = 3; % in your case 72 A = [2 28.2; 2 28.2; 2 28.2; 2....

más de 7 años hace | 0

Respondida
A wire of 3 m length is to be used to make a circile and a square. How should the wire be distributed between two shapes in order to minimize the sum of the enclosed areas?
Hi, your code returns the correct result. Here is another way to write the same in symbolic form: syms l1 l2 % declare symboli...

más de 7 años hace | 2

| aceptada

Respondida
How to normalize data ?
x = rand(1,25); x = (x-mean(x))/std(x)

más de 7 años hace | 1

| aceptada

Respondida
1-hour to 6-hour aggregation?
Hi, retime should do the job - see the example: a = hours(1:6) + datetime('00:00','format','HH:mm'); b = [1 2 3 4 5 6]; c = ...

más de 7 años hace | 0

Respondida
Is there an Optimization Tool that returns a function?
Hi, yes, there is functionalDerivative which is useful in this case. See the examples in the documentation. There is a tutorial...

más de 7 años hace | 0

| aceptada

Respondida
Warning: Escaped character '\U' is not valid.
Hi, for backslash use double backslash - that solves the problem, for example: use 'C:\\user' instead of 'C:\user' Do this ...

más de 7 años hace | 5

| aceptada

Respondida
How can get the value for each time step for a variable inside of a function?
Hi, you try this code (all in one file as nested function). The values you want to have in every iteration are now added to the...

más de 7 años hace | 0

| aceptada

Respondida
how to convert 5.5 hour to 05:30:00 HH:MM:SS format?
a = hours(5.5); b = datetime('00:00:00','Format','HH:mm:ss'); result = a+b result = datetime 05:30:00

más de 7 años hace | 1

Respondida
Matlab jokes or puns
A physicist, a matlab programmer and a firefighter are invited to a social science experiment. Everyone spends a week in a compl...

más de 7 años hace | 0

Respondida
How to solve iteratively equation
Hi, there is an analytic solution: syms p0 p beta eqn1 = p0 == sqrt(1+64*beta); eqn2 = p == p0+8*(1/p0-1); eqn2 = subs(eqn2...

más de 7 años hace | 1

Respondida
Having a system of three state I put the odes in a function and the script to solve the given function but now it is executing continuously, so tell me how to stop it?
Hi, try: calculate_system function calculate_system A=[0 1 0;0 0 1;-1 -2 -3]; B=[0 0;0 1;1 0]; C1=[0 1]'; C2=[1 0 ;0 1]; ...

más de 7 años hace | 1

Respondida
How to select random numbers from array for creating new matrix?
Hi, try: b1=[-3,-1,1,3,5]; A = b1(randi(numel(b1),3,4)) possible result: A = 1 -1 -3 3 -3 5 -...

más de 7 años hace | 2

| aceptada

Respondida
I have a matrix 'm' of oder 4 by6by960. I want to extract 1st and 3rd dimensions, i.e 4by960. how to do this?
Hi, all the non-zero elements are in column 1 - not in column 6: m=rand(4,960); m = [m; zeros(20,960)]; m=permute(reshape(m,...

más de 7 años hace | 0

| aceptada

Respondida
how to read images in MATLAB when images are saved in one folder in the form of image(1),image(2)........image(2000).
Hi, you can use numberedFileNameArray from FEX. Here is an example how to use it: names = numberedFileNameArray(1,5,'C:\user\p...

más de 7 años hace | 0

Enviada


numberedFileNameArray
Creates a string array of file names automatically numbered as specified in input

más de 7 años hace | 1 descarga |

0.0 / 5

Respondida
I need to type a very long equation. How can I do a line break ?
Hi, use for example: f = @(x,y) 2*x^2 + 4*y^3 +... 4*y - 6*x^3 + 3*x^0.5... - 2*x*y + 11*y^(-0.5) + 6 Answer: f = f...

más de 7 años hace | 1

Respondida
converting gray to RGB
Hi, consider this information regarding the algorithm that rgb2gray uses: "...rgb2gray converts RGB values to grayscale values...

más de 7 años hace | 0

Respondida
Calculating time component on a function
Hi, have a look to this accepted answer to solve your problem - the question is very similar to yours. Best regards Stephan...

más de 7 años hace | 1

| aceptada

Cargar más