Pregunta


MATLAB Answers Wish-list #6 (and bug reports)
This is the 6th installment of the wish-list and bug report thread. This topic is the follow on to the first Wish-list for MATL...

alrededor de 1 año hace | 6 respuestas | 1

6

respuestas

Respondida
How to save multiple polts with the source file name using loop?
You have all elements already in your code. Why not uncomment savefig and use files(i).name?

alrededor de 1 año hace | 0

Respondida
read value from an external file .txt
You can do it with fscanf, but it you get a lot more flexibility if you use a regular expression instead. If you want to use thi...

alrededor de 1 año hace | 0

Respondida
Shuffle row order within every N rows in a matrix
Just use a loop with randperm: data=[ 1 2 4 1 1 1 2 4 2 1 1 2 4 1 2 1 2 4 2 2 1 2 4 1 1 1 2 4 2 ...

alrededor de 1 año hace | 0

Respondida
A compact way to horizontally concatenate rows of many cell arrays ?
Two calls to horzcat and a loop do the trick, although this can probably be improved a lot. % Input a{1} = {[0 0 1 4 1] ...

alrededor de 1 año hace | 1

Respondida
Is Matlab generally faster at computing polynomials or trigonometric functions?
You mean you want to approximate your complicated function with many calls by a single polynomial? If that is possible with your...

alrededor de 1 año hace | 0

Respondida
Calculations wrong in appdesigner
app.mdot_P33 = 1.2; app.mdot_P3 = 2.4; app.T3 = 315; app.mdot_P4 = 1.2; app.T4 = 316; app.T5 = (app.mdot_P33/app.mdot_P3)*a...

alrededor de 1 año hace | 0

Respondida
Selecting a file to create a plot on MATLAB
You mean like uigetfile and prompt?

alrededor de 1 año hace | 0

Respondida
Is it possible to implement a GUI in a Matlab script?
For general advice and examples for how to create a GUI (and avoid using GUIDE), have look at this thread. It will show you dif...

alrededor de 1 año hace | 0

| aceptada

Respondida
Sound files with 4 channels in MATLAB
S = load('handel'); new_y = repmat(S.y,1,4); size(new_y) Now you can no longer use the sound function, as that only supports ...

alrededor de 1 año hace | 0

| aceptada

Respondida
How to present this equation for plotting
You need either power or .^ (otherwise you perform a matrix power). So apart from that correction, either will work. I would ...

alrededor de 1 año hace | 0

Respondida
2012 and 2018 compatibility
It is not completely true that all code that runs without error on R2012a (or b) will run with the same effect on R2018a (or b)....

alrededor de 1 año hace | 0

Respondida
Why does subtracting '0' from an array of char appear to convert it to a numerical double.
The minus function is not really defined for char, so the operands need to be converted to a datatype that is supported. Since ...

alrededor de 1 año hace | 1

| aceptada

Respondida
Range variables callback issue
I fully agree with Stephen that you should not use global variables. There are more legitimate uses than eval, but not many. ...

alrededor de 1 año hace | 0

| aceptada

Respondida
How to change the symbol size of the legend
This is only possible by increasing the size of the markers themselves in the plot. If you don't want that, you will need to cre...

alrededor de 1 año hace | 0

Respondida
Copying files based on a text file from a source folder that contains multiple sub-folders to a destination folder
The readlines function will allow you to read a text file (storing each line as an element of a string vector). The functions...

más de 1 año hace | 0

Respondida
How can I use a user define function (.m file) as the prob.objective
From what I can tell reading the documentation, the easiest way would be to use the <https://www.mathworks.com/help/optim/ug/fcn...

más de 1 año hace | 0

Respondida
is it possible to create a matlab script directly from gui pushbutton events (kind of like command line history)?
If you don't use numbered variables, you can include an fprintf statement that will write a line to a text file. There is no aut...

más de 1 año hace | 0

Respondida
Set at least two ticks on log scales in figures
I don't know if this is an acceptable solution for you, but you could query the current tick labels and take action in your code...

más de 1 año hace | 1

Respondida
how to determine if vector of row times is within timerange?
The timerange datatype is really only intended to be used with timetables. Once you convert your dates to a timetable, you can u...

más de 1 año hace | 1

| aceptada

Respondida
parfor loop output and input are not matched in order
I suspect the source of the problem is the interaction with the file system. You should consider generating a random file name ...

más de 1 año hace | 1

| aceptada

Respondida
Try catch error 'Unrecognized function or variable'
The code in the try block will be executed normally. If any line results in an error, the execution will abort, and the catch bl...

más de 1 año hace | 1

Respondida
FFT of EEG data
Are you sure your file is in the format this function expects? This is a good lesson for your own code: make sure to write docu...

más de 1 año hace | 0

| aceptada

Enviada


readfile
read any (text) file, either UTF8 or ANSI

más de 1 año hace | 17 descargas |

Thumbnail

Respondida
how can I find distance between one base station and all the users separately?
You can use the hypot function to calculate the Pythagorean distance. Check the documentation to see if it allows array inputs. ...

más de 1 año hace | 0

| aceptada

Respondida
I am currently a college student.
That is correct. You are no longer allowed to use the student license if you are no longer a student. If you become a student ag...

más de 1 año hace | 1

| aceptada

Respondida
run matlab online platform
Perhaps you mean Matlab Online?

más de 1 año hace | 0

Respondida
vpasolve all solutions?
There might be a direct way, but at the very least there is a workaround: Since you can specify an initial estimate, you can ...

más de 1 año hace | 0

Respondida
How to solve numerically and find the smallest value?
You can supply an initial estimate or a search range to vpasolve, as its documentation explains: syms v L0 x x=2; A=sqrt(2)*x...

más de 1 año hace | 0

| aceptada

Respondida
gunzip(url) function not downloading archived file properly.
The file itself is not publicly available without a login, and that is what matters. Using websave will not help, nor will using...

más de 1 año hace | 0

Cargar más