Respondida
Polyval gives me a error
Try this out: g= fit(z',y,'poly1'); P=[g.p1 g.p2]; t1 = polyval(P,0.001)

más de 12 años hace | 0

Respondida
how to convert image into square matrix??
Use _imresize_: B = imresize(A, [numrows numcols])

más de 12 años hace | 0

| aceptada

Respondida
problem with subscript indices and varibles in functions
It is just that what the error message says, you are trying to access the image with a non integer index. Check your indexes ou...

más de 12 años hace | 0

Respondida
How to make loops run faster
Your problems could lay on the _Eon_pris_t(i,j)_ _Gaspris_t(i,j)_ functions: The calling itself takes its time, although it sh...

más de 12 años hace | 0

Respondida
.m file to excutable file in linux
You are dealing with two different platforms. The software you create in one, is not easily usable in the other. You can try i...

más de 12 años hace | 0

Respondida
returning the input value with maximum output
There are several choices to find minimum/maximum values. You can take a look at the built-in function _fmincon_ for example. I...

más de 12 años hace | 0

| aceptada

Respondida
what does these block means and how they work?
It is a feedback system with a step signal as input. This input has a gain ( 2 ) and it is integrated. It looks like a simple i...

más de 12 años hace | 0

Respondida
How to run in same time as C
It happens than C is much faster than Matlab. Even when Matlab is well optimized when it comes to processing speed, C is a lowe...

más de 12 años hace | 1

Respondida
Question about velocity graphs with quiver3
Did you read the _help_? help quiver3 with your code, you are setting the velocities to 0, no doubt you do not get any...

más de 12 años hace | 0

Respondida
How to check the value of a varriable of a subfunction?
You can send the variable, from the local function, to the base workspace using _assignin_: assignin('base', 'my_variable',...

más de 12 años hace | 0

Respondida
reading values from vector into different equal parts over loop
Is this what you need? p1 = haltonset(1); x1 = p1(1:10^6); for i = 2:5 x1 = p1( (i-1)*10^6: i*10^6) ); end...

más de 12 años hace | 0

Respondida
find the center point of color
Try with the built-in function _regionprops_. One of the properties returned by this function is the center of mass of each r...

más de 12 años hace | 0

| aceptada

Respondida
Using GUI in an external function
You just need to define your input/output data as input and output arguments in your function. You can also use variables as glo...

más de 12 años hace | 0

Respondida
How can I have a better plot?
Change the marker size to fit your needs: plot(rand(10), '*','MarkerSize',10) plot(rand(10), '*','MarkerSize',5)

más de 12 años hace | 0

| aceptada

Respondida
How to convert GUI matlab to coding without used GUI
If I understand right, you want to create code to do the same a GUI does. You have a lot of copy/paste to do, delete references ...

más de 12 años hace | 0

Respondida
How to find the nine biggest numbers?
Sort your matrix in descending order: m = rand(5,4); % example matrix [rows cols] = size(m); m2 = reshape(m,rows*cols...

más de 12 años hace | 0

Respondida
Regarding length of an image.
From Matlab point of view, an image is a matrix (sometimes a 3D matrix). if Im is the matrix containing your image, length...

más de 12 años hace | 0

| aceptada

Respondida
how to make a matrix elements randomly distributed
Try this out (adapt the values to your needs): m = 10; n = 3; pos = randperm(m*n,m); M = zeros(m,n); M(pos) = 1...

más de 12 años hace | 0

| aceptada

Respondida
How can I combine two columns?
Use the built-ibn function _cat_: a = [1 2; 3 4]; b1 = [2 4]; b2 = [2; 4]; c1 = cat(1,a,b1); c2 = cat(2,a,b2); ...

más de 12 años hace | 0

Respondida
Creating Menus using GUIDE
You can make use of the message box utility: msgbox('your message here'); Insert you help message and link the _msgbox_ ...

más de 12 años hace | 1

| aceptada

Respondida
Insert radio button inside a listbox
you can not do that.

más de 12 años hace | 1

| aceptada

Respondida
Difficulty Assigning String Values after Regexp
you did not define neither the value of _Gov_ nor _bv_. Your code: x = (GoodObjectValue{Gov}); y = (BadValue{Bv}); i...

más de 12 años hace | 0

Respondida
deleting part of a list of strings
do you have a cell array containing your strings? If my_cell is your cell array, try: str = char(my_cell{k}); for the...

más de 12 años hace | 0

Respondida
deleting part of a list of strings
Since in you GPS data you want to trim right after the "E", you can try this: str='$SDDBT,00006.5,f,0002.0,M,0001.0,F*06,$G...

más de 12 años hace | 0

Respondida
Send data from Matlab to Arduino Mega 2560
When you measure the signal, the voltmeter introduces a voltage drop in the line so that the signal does not arrive its destiny ...

más de 12 años hace | 0

Respondida
Send data from Matlab to Arduino Mega 2560
The two lines you talk about are these: On matlab: a(i)=fscanf(serialPort,'%d'); on arduino: Serial.println(volt...

más de 12 años hace | 1

Respondida
Cases with a changing string length
You are not using the switch-case properly. In your case, your code check the value of _Astr_ and see if it equals any of the ca...

más de 12 años hace | 0

| aceptada

Respondida
There is any way to know the dimensions of an excel file (rows, columns) without using xlsread?
NO, there is not a way to do what you need/want.

más de 12 años hace | 0

Respondida
xlsread with changing Excel name
You can try to adjust the following to your code: my_xls = dir ('*.xlsx'); % struct with your xlsx files for k = 1:l...

más de 12 años hace | 0

Respondida
How to fill the region between two edges of a vein like structure?
Did you explore the built-in function _fill_ ? Could you give some code example?

más de 12 años hace | 0

Cargar más