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

11 years 前 | 0

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

11 years 前 | 0

| 已接受

已回答
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...

11 years 前 | 0

已回答
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...

11 years 前 | 0

已回答
.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...

11 years 前 | 0

已回答
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...

11 years 前 | 0

| 已接受

已回答
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...

11 years 前 | 0

已回答
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...

11 years 前 | 1

已回答
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...

11 years 前 | 0

已回答
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',...

11 years 前 | 0

已回答
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...

11 years 前 | 0

已回答
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...

11 years 前 | 0

| 已接受

已回答
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...

11 years 前 | 0

已回答
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)

11 years 前 | 0

| 已接受

已回答
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 ...

11 years 前 | 0

已回答
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...

11 years 前 | 0

已回答
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...

11 years 前 | 0

| 已接受

已回答
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...

11 years 前 | 0

| 已接受

已回答
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); ...

11 years 前 | 0

已回答
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_ ...

11 years 前 | 1

| 已接受

已回答
Insert radio button inside a listbox
you can not do that.

11 years 前 | 1

| 已接受

已回答
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...

11 years 前 | 0

已回答
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...

11 years 前 | 0

已回答
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...

11 years 前 | 0

已回答
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 ...

11 years 前 | 0

已回答
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...

11 years 前 | 1

已回答
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...

11 years 前 | 0

| 已接受

已回答
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.

11 years 前 | 0

已回答
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...

11 years 前 | 0

已回答
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?

11 years 前 | 0

加载更多