Respondida
How to plot a 2d potential function
f = @(X,Y) cos(2*pi.*X).*(1+3.*Y) + ((2*pi.*Y).^2)/2 fsurf(f)

más de 7 años hace | 0

| aceptada

Respondida
how to get the inverse of a symmetric matrix and ensure accurancy
Hi, you could consider to do the calculation symbolic. Here is a small example: A = [9 3 -6 12; 3 26 -7 -11; -6 -7 9 7; 12 -11...

más de 7 años hace | 1

| aceptada

Respondida
How to calculate 8760 data just in one process?
Hi, this is easy: 1) Use xlsread to import the data to Matlab: E = xlsread('PV.xlsx'); 2) Define your constant values - for ...

más de 7 años hace | 0

| aceptada

Respondida
How can I convert a double array into a timestamp array?
Hi, use: B = datestr(A, 'HH:MM:SS.FFF') B = 3×12 char array '16:30:37.762' '16:30:37.769' '16:30:37.772' ...

más de 7 años hace | 2

| aceptada

Respondida
How do I extract the exponent from a semilogy plot?
Hi, i think you should use lsqcurvefit (requires Optimization Toolbox) or fit (requires Curve Fitting Toolbox) - depending on t...

más de 7 años hace | 0

| aceptada

Respondida
How to find length of user input?
Hi, a lots of bugs in this - i think i fixed them all: clc clear isbn = input('Enter a nine digit ISBN number:' ); isbn = c...

más de 7 años hace | 0

| aceptada

Respondida
Help in Plotting ECG .csv file
Hi, try this: A=csvread('samples.csv',2,0); plot(A(:,1),A(:,2)) For me it works - there is no problem with your plot functio...

más de 7 años hace | 0

| aceptada

Respondida
How can I create another y-axis on right side?
Hi, use yyaxis. For example: x=A0006_charge(:,1); y=A0006_charge(:,2); a=A0006_charge(:,3); z=A0006_charge(:,4); yyaxis ...

más de 7 años hace | 0

| aceptada

Respondida
Terms should add to zero but they don't. Why is this?
Hi, this is due to rounding errors that can not be prevented. You are dealing with numeric calculations, which have a limited a...

más de 7 años hace | 0

Respondida
what is wrong with my function
You calculate the area of a rectangle. Think about the formula of triangle area...

más de 7 años hace | 0

Respondida
How to replace variable name in function handle?
Hi, for me this worked: f = @(x1,x2) x1*x2 f = string(char(f)); f = replace(f,"@(x1,x2)","@(x)"); f = replace(f,["x1","x2"]...

más de 7 años hace | 1

| aceptada

Respondida
Problem with Linear Regression
Hi, this problem can be solved easily by using mldivide. No additional toolboxes are needed: knobSetting = [0 1 2 3 4 5]'; fl...

más de 7 años hace | 0

Respondida
Solve with a vector of coefficients
Hi, if i assume that you do not do symbolic calculations and you have values for D, then for this purpose there is the roots fu...

más de 7 años hace | 1

| aceptada

Respondida
How can I create a linspace with a condition
Hi, if you know the maximum allowed spacing you can use: function result = mySpacing(StartValue,EndValue,maxSpaceValue) resul...

más de 7 años hace | 2

| aceptada

Respondida
how can i write a for loop for g=[2 5 6 8 9]
Hi, use numel function: for i = 1:numel(g) Best regards Stephan

más de 7 años hace | 0

Respondida
Logical Not Operation To The Fields Of Struct
% define example a(1).b = true; a(2).b = false; % show start values a.b % Reverse them all for k = 1:numel(a) a(k...

más de 7 años hace | 0

Respondida
How to find out the location difference of nonzero entries in two sparse matrices?
Hi, this are not sparse matrices. However you find the locations given as row and column values and the corresponding values wi...

más de 7 años hace | 1

| aceptada

Respondida
Classification learner app not recognizing response variable
Hi, this topic was discussed a few weeks ago. There is no precise answer, since the documentation does not deal with this probl...

más de 7 años hace | 0

Respondida
How do I tell Matlab a loop index is an integer?
Hi, by default numbers in Matlab are double. cast them to integer: int32(i) Read here: https://de.mathworks.com/help/release...

más de 7 años hace | 0

Respondida
I can't find where the mistake is. Could anyone help me with my code?
Hi, the way you define t is not useful. Use: t = [0 100] What you do is corresponding to a sample rate of 1 second. This lets...

más de 7 años hace | 0

| aceptada

Respondida
Solving simultaneous time-dependent matrix equations
Hi, try: % Defining constants A_a = 7.7790; g1_1 = [0.0019 0.0076] g2_1 = [0.0021 0.0083] ga_1 = [0.1862 0.3725] Hv1 = 2....

más de 7 años hace | 0

| aceptada

Respondida
how to create a time table from a table with a column with year number as row times?
Hi, try: arimaxdata.t = years(arimaxdata.t) arimaxdata = table2timetable(arimaxdata) Best regards Stephan

más de 7 años hace | 0

Respondida
Having trouble solving system of equations
Hi, shorter: syms c1 c2 [sol_c1, sol_c2] = vpasolve(c1==18*c1-1200+((4.8195*10^-8)*(((0.3*c1+c2)^4)-18^4)),c1==(20*c2-500)/-0...

más de 7 años hace | 1

Respondida
License reinstate fee should be more flexible.
Hi, this forum is run by volunteer Matlab users who can not comment on TMW's licensing policy. You should consider sending your...

más de 7 años hace | 0

Respondida
Looking for candlestick, rsi, csv file example
Hi, here is a working example for candlestick containing .csv-data which works on R2018b: https://de.mathworks.com/matlabcentr...

más de 7 años hace | 0

| aceptada

Respondida
optmization problem in hybrid energy storage system.
Hi, there is an example given which appears to be similar to the task you want to do: https://de.mathworks.com/help/optim/ug/o...

más de 7 años hace | 0

Respondida
Red Dotted Wire Problem
Hi, try: https://de.mathworks.com/help/physmod/simscape/ref/voltagesensor.html coupling physical signals to usual Simulink si...

más de 7 años hace | 0

Respondida
isAlways(x^2>=0) is unable to give a solution. Why so when the problem is so simple?
Hi, Matlab also calculates with complex numbers. Make assumptions on x: syms x assume(x,'real') result = isAlways(x^2>=0) ...

más de 7 años hace | 2

| aceptada

Respondida
Branch and bound optimization
Hi, see here: https://de.mathworks.com/help/optim/ug/intlinprog.html?s_tid=doc_ta#bts3f9f-4 Best regards Stephan

más de 7 años hace | 0

| aceptada

Respondida
Receiving 'Dimensions of arrays being concatenated are not consistent.' error, but there are equal amounts of rows being input.
Hi, try: T = table(Mean, Std_Error, Deviation, Variance, Min, Max, Range, Confidence_95,'VariableNames',{'mean','sem','std','v...

más de 7 años hace | 2

| aceptada

Cargar más