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

quasi 8 anni fa | 1

| accettato

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

quasi 8 anni fa | 0

| accettato

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

quasi 8 anni fa | 0

Risposto
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

quasi 8 anni fa | 0

| accettato

Risposto
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

quasi 8 anni fa | 0

| accettato

Risposto
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

quasi 8 anni fa | 0

| accettato

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

quasi 8 anni fa | 0

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

quasi 8 anni fa | 0

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

quasi 8 anni fa | 0

| accettato

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

quasi 8 anni fa | 0

| accettato

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

quasi 8 anni fa | 10

| accettato

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

quasi 8 anni fa | 0

| accettato

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

quasi 8 anni fa | 0

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

quasi 8 anni fa | 2

| accettato

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

quasi 8 anni fa | 1

| accettato

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

quasi 8 anni fa | 0

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

quasi 8 anni fa | 0

| accettato

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

quasi 8 anni fa | 5

| accettato

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

quasi 8 anni fa | 0

| accettato

Risposto
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

quasi 8 anni fa | 1

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

quasi 8 anni fa | 0

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

quasi 8 anni fa | 1

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

quasi 8 anni fa | 1

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

quasi 8 anni fa | 2

| accettato

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

quasi 8 anni fa | 0

| accettato

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

quasi 8 anni fa | 0

Inviato


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

quasi 8 anni fa | 11 download |

0.0 / 5

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

quasi 8 anni fa | 1

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

quasi 8 anni fa | 0

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

quasi 8 anni fa | 1

| accettato

Carica altro