Most voted "matlab" questions
MATLAB (Matrix Laboratory) is a high performance interactive software for numerical calculation.
Learn more…123 questions
Sort by count of
-
0
votes1
answer233
viewsSave file to columns
I need to save data from a file .txt to open in excel. I can save the data, so that each loop is saved one below the other, but I can’t save in columns. The first two columns are the same, which is…
matlabasked 5 years, 11 months ago Juliano Cardoso 21 -
0
votes0
answers29
viewsChanging Solver for global optimization in MATLAB
I have a solver called Solvopt and it is good to solve my problem of Soft and unrestricted minimizing, but usually it stops at minimal locations. On the university computer I have all the toolboxes…
-
0
votes1
answer37
viewsMatlab: how to write a function that takes a number n and returns P = 1*1.2*1.4*.... *(1+0.2*(n-1))
How could you create a function called repeat_prod(n) that takes a number n and returns this function P = 1*1.2*1.4*....(1+0.2(n-1)) I’m having a hard time understanding how this function should be…
-
0
votes1
answer96
viewsCan anyone help me in this Matlab exercise
Someone can help me in this exercise Matlab. It’s Alinea B. I did so but I could not understand why this is wrong. Could you explain to me why it is wrong? function [i120, m120] = func11(mat) i120 =…
matlabasked 5 years, 10 months ago user99237 -
0
votes1
answer119
viewsMatlab code error
Can someone please give me a hand? I’m trying to make a program on Octave and it’s giving me the following mistake: max recursion Depth exceeded error Caled from Size at line 3 column 3 spending at…
matlabasked 5 years, 9 months ago user99237 -
0
votes0
answers76
viewsPython control.Python lsim
I’m trying to get the system response by inserting a sinusoidal input function, but the code below gives the following error: Valueerror: Parameter T: time values must be equally Spaced. from…
-
0
votes0
answers13
viewsFormat no Octave
Hi, I’m applying the textscan function to the Octave and I want it to read 3e-6 and 100, and turn to 3.0000e-06 and 1.0000e+03, as I should write this textscan??
-
0
votes1
answer17
viewsColumn extraction from a Time Series in Matlab
I want to extract the time column of the Matlab time series, shown in the figure below. Commands to slice matrices in Matlab do not seem to work with time series. Matlab gives me the following…
-
0
votes0
answers15
viewsHow do I do a function to receive only square matrices?
Which argument in the condition structure to restrict only square matrices? function x(A) A = input('Insira matriz') if A ?
-
0
votes1
answer49
viewsLoad a variable from another funtion
I have the following question which I could not solve through research. I have a function that within it I create a variable to perform a count, and later I need the final value of that count in…
-
0
votes0
answers81
viewsHow to optimize Shannon entropy calculation function?
I did this function to calculate the entropy of Shannon in a string array, this vector is filled with Ips addresses, I would like to optimize this function since for cases where the input vector is…
matlabasked 5 years, 4 months ago Pedro Canassa 1 -
0
votes1
answer148
viewsMATLAB Recognition of geometric figures
The program in Matlab has to have as input an image (black and white) and as output a string with the format name of this image (circle, star, rectangle, square, ellipse). the code I made this…
matlabasked 5 years ago João Menegaz 3 -
0
votes2
answers251
viewsError in OCTAVE code
I just started programming on OCTAVE and my code presented the following error: Commands and function call >> A = imread('cameraman.tif'); >> B = imread('circuit.tif'); >> D =…
matlabasked 4 years, 9 months ago Rafael Sponchiatto 21 -
0
votes0
answers22
viewsDoubt MATLAB code for Opencv C++
Good evening, everyone! I would like some help in relation to passing a code that is in Matlab to opencv c++. I’m trying to do some operations with rgb channels, but Thresh’s value is not the same -…
-
0
votes0
answers14
viewsTraverse a BD with Strings and compare with a Char variable
So person is as follows, I’m creating a program to perform the reading of vehicular plates, through OCR and PDI I can already extract a Char from the image ex: 'ABC 1234', and now I need to go…
-
0
votes0
answers9
viewsI don’t know the correct Scilab syntax
I’m having a problem with Scilab, I migrated from Mathlab to Scilab to do an academic job but I’m having trouble with the following code: c1x=input('centro da circunferencia 1 (x): ');…
-
0
votes0
answers22
viewsConfiguring the output of a Matlab S-Function
I have the following codes in Matlab. function dx=massamola(t,x,u) m=1; k=1; b=1; x1 = x(1); x2 = x(2); dx1 = x(2); dx2 = -(k/m)*x1-(b/m)*x2+(1/m)*u; dx=[dx1;dx2]; soon after I have a specific code…
matlabasked 3 years, 5 months ago user13053456 1 -
0
votes0
answers18
viewsS-Function error: Output returned by S-Function 'Hi_plant_sfcn' in 'Untitled/S-Function' During flag=3 call must be a real vector of length 1
S-Function brings the following message: "Output returned by S-Function 'Hi_plant_sfcn' in 'Untitled/S-Function' During flag=3 call must be a real vector of length 1" my code: function…
matlabasked 3 years, 5 months ago user13053456 1 -
-1
votes1
answer536
viewsDoubt in the implementation of the Matlab function ode45
I never used the function ode45 of Matlab. Below the function and the program I developed, someone, please, can help me find the errors? -Function Function di=didt(t,i,flag,R,L,v,f,Rsec) I1=i(1);…
-
-1
votes1
answer1320
viewsHow to navigate a matrix in Matlab?
Good evening! Can anyone help me with this exercise? "Create a filename filter_matrix. m and save it to your personal account. Type a function name filter_matrix that receives a matrix as an…
-
-1
votes1
answer63
viewsLength and width calculation
Hello, I’m developing an application in Octave, which is very similar to Mathlab and C, which calculates the height and width of an object, which in this case is a seed. The program receives an…
-
-2
votes1
answer41
viewsWriting of MATLAB functions
How am I supposed to write this function in MATLAB? '1/(1+(1/(1+e(30*x))))' I’ve tried a thousand ways and it’s always wrong. Does anyone have any idea ?…
matlabasked 5 years ago Kublai Khan 1 -
-3
votes1
answer114
viewsPerformance difference between C and Matlab
Friends, I created two apparently identical encryption codes, one in C language and the other in Matlab, the code in Matlab has more functions, that is, it is more extensive and performs more…