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

oltre 12 anni fa | 0

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

oltre 12 anni fa | 0

| accettato

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

oltre 12 anni fa | 0

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

oltre 12 anni fa | 0

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

oltre 12 anni fa | 0

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

oltre 12 anni fa | 0

| accettato

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

oltre 12 anni fa | 0

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

oltre 12 anni fa | 1

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

oltre 12 anni fa | 0

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

oltre 12 anni fa | 0

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

oltre 12 anni fa | 0

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

oltre 12 anni fa | 0

| accettato

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

oltre 12 anni fa | 0

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

oltre 12 anni fa | 0

| accettato

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

oltre 12 anni fa | 0

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

quasi 13 anni fa | 0

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

quasi 13 anni fa | 0

| accettato

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

quasi 13 anni fa | 0

| accettato

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

quasi 13 anni fa | 0

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

quasi 13 anni fa | 1

| accettato

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

quasi 13 anni fa | 1

| accettato

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

quasi 13 anni fa | 0

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

quasi 13 anni fa | 0

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

quasi 13 anni fa | 0

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

quasi 13 anni fa | 0

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

quasi 13 anni fa | 1

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

quasi 13 anni fa | 0

| accettato

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

quasi 13 anni fa | 0

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

quasi 13 anni fa | 0

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

quasi 13 anni fa | 0

Carica altro