Answered
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....

7 years ago | 1

| accepted

Answered
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.*...

7 years ago | 0

| accepted

Answered
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 ...

7 years ago | 0

Answered
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

7 years ago | 0

| accepted

Answered
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

7 years ago | 0

| accepted

Answered
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

7 years ago | 0

| accepted

Answered
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, ...

7 years ago | 0

Answered
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...

7 years ago | 0

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

7 years ago | 0

| accepted

Answered
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'...

7 years ago | 0

| accepted

Answered
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 * ...

7 years ago | 10

| accepted

Answered
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-...

7 years ago | 0

| accepted

Answered
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....

7 years ago | 0

Answered
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...

7 years ago | 2

| accepted

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

7 years ago | 1

| accepted

Answered
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 = ...

7 years ago | 0

Answered
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...

7 years ago | 0

| accepted

Answered
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 ...

7 years ago | 5

| accepted

Answered
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...

7 years ago | 0

| accepted

Answered
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

7 years ago | 1

Answered
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...

7 years ago | 0

Answered
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...

7 years ago | 1

Answered
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]; ...

7 years ago | 1

Answered
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 -...

7 years ago | 2

| accepted

Answered
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,...

7 years ago | 0

| accepted

Answered
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...

7 years ago | 0

Submitted


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

7 years ago | 1 download |

0.0 / 5

Answered
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...

7 years ago | 1

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

7 years ago | 0

Answered
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...

7 years ago | 1

| accepted

Load more