Respondida
How to Define Title Before Plotting?
Because |plot| is a high level command and will clear a lot of things, unlike the |line| function (which is what |plot| is calli...

casi 8 años hace | 2

| aceptada

Respondida
A car laps a racetrack in 90s. The speed of the car at each 6 second interval is determined using a radar gun and is given from the beginning of the lap, in m/s.
Two changes (also, |k| is unused): function Q2(~) k=[0,1,2,3,4,5,6,7,8,9,10,11,12]; t=[0,6,12,18,24,30,36,42,48,54,60...

casi 8 años hace | 0

| aceptada

Respondida
How to create an array with its cells are vector variable?
You should use curly braces to make cells: A={a b c};

casi 8 años hace | 2

Respondida
I have this problem
The easiest way to do this is with a loop. A second method is less easy to follow, but removes the need for a loop. The final st...

casi 8 años hace | 1

| aceptada

Respondida
How can i do the scaling with negative integer.. i have done this with the positive integer?
To have negative steps with the <https://www.mathworks.com/help/matlab/ref/colon.html colon operator>, you need to make sure you...

casi 8 años hace | 0

| aceptada

Respondida
How do I make the loop run?
The |dir| function returns a struct array, so you can loop through those: file_list=dir('tdump*');%replace this by your own...

casi 8 años hace | 0

Respondida
How can I Read all the details of my .txt file
If you use <https://www.mathworks.com/help/matlab/ref/dlmread.html |dlmread|>, you can define a number of rows you would like to...

casi 8 años hace | 0

| aceptada

Respondida
How to fix this erro in GUIDE?
Either end all functions with the |end| keyword, or end none of them with the |end| keyword. The default that GUIDE uses is not ...

casi 8 años hace | 0

Respondida
Can I install Matlab 2013a on Windows 10 64 bits machine?
Although Windows 10 is not in the <https://www.mathworks.com/content/dam/mathworks/mathworks-dot-com/support/sysreq/files/System...

casi 8 años hace | 0

| aceptada

Respondida
How to extract complex cell data into a new variable?
Using a double loop to accomplish this is still reasonably fast: %generate a random H s1=2000;s2=13; H=cell(s1,1); ...

casi 8 años hace | 0

| aceptada

Respondida
Store every n rows of a matrix in cell
You can do that with the |mat2cell| function. A=rand(11808,1); k=96; B=mat2cell(A,k*ones(size(A,1)/k,1),1); Note t...

casi 8 años hace | 2

| aceptada

Respondida
How do i find the coordinates of point given its intensity ??
The second output of |max| returns a linear index, which you can convert to subscripts with |ind2sub|. [maxval,maxind]=max(...

casi 8 años hace | 0

| aceptada

Respondida
Using a matrix to define which rows to display from another
med=(-0.5:1.5)+size(M,1)/2;

casi 8 años hace | 0

Respondida
Fopen: Invalid Parameter List
There may be more errors (please include your file so we can check), but at the very least you should use |fopen| with the read ...

casi 8 años hace | 0

Respondida
How to read text file line by line and store line into cell array?
You need to generate a valid fileID with |fopen|. Then you can use other file reading tools, which you shouldn't mix like this. ...

casi 8 años hace | 0

| aceptada

Respondida
Creating dummy variables with if statements
You should try the crash course that Mathworks provides for free <https://matlabacademy.mathworks.com/R2018a/portal.html?course=...

casi 8 años hace | 2

Respondida
How to other all the matrix based on other vector
Matlab is not zero-indexed, hence the +1 below. B = [0 0 ; 1 4 ; 2 16 ; 3 19 ; 4 5 ; 5 39 ; 6 4] ; C = [3 4 5 6 0 1]; or...

casi 8 años hace | 1

| aceptada

Respondida
How to properly apply cellfun in this case - text spliting
You need to have the index available as a separate input: A = cellfun(@(x,ind) x(1:ind-1),t{:,1},num2cell(Blank1st),'Unifor...

casi 8 años hace | 1

Respondida
Plotting the difference of two functions and finding the roots - octave
You can just define a new anonymous function and use that as an input to fzero, just like you would in Matlab. <https://octave.s...

casi 8 años hace | 0

Respondida
Help with MATLAB Code - Plot is ignoring 0 value
Actually the zero value *is* undefined, because of a division by zero. You can use |isnan| to replace this with 0.

casi 8 años hace | 0

| aceptada

Respondida
How to save these for loop's outputs in 4x3 matrix format?
You mean like this? X = [4 1 9 ;1 9 9]; Y = [0 1 5 ;0 9 6]; Z = [Y X]; output=cell(3,6); for f=1:3 for g...

casi 8 años hace | 0

Respondida
Looping through folders and perform script
# Use a |dir| call to figure out the number of suffixes (or suffices?) # Use two nested loops to determine the selection of you...

casi 8 años hace | 0

| aceptada

Respondida
Hello! I would like to know how can i disable the button maximize from figure window
You could make the position relative (i.e. change the |Units| to |Normalized|), or simply set the figure property |Resize| to |o...

casi 8 años hace | 1

| aceptada

Respondida
hi how can I graph a multisphere
According to the <https://www.mathworks.com/help/releases/R2018a/pde/ug/multisphere.html doc> it was introduced in R2017a, altho...

casi 8 años hace | 0

Respondida
How do I avoid this error "Subscript indices must either be real positive integers or logicals?"
You should use functions to represent functions. Although you can follow Geoffs advice to fix this particular issue, your could ...

casi 8 años hace | 0

Respondida
Is it possible to use regexprep to insert a '*' between a number following a letter?
Now I'm awake again: you can also do this in a oneliner: str='C2+H4-28D'; m=regexprep(str,'([A-Za-z])(\d)','$1*$2');

casi 8 años hace | 4

| aceptada

Respondida
Matrix dimensions and unbalanced bracket problem
Here's a complete plot. You also forgot to put in extra exponents for the lower bounds. %t=0:1e-6:10e-6; t=linspace(0,10...

casi 8 años hace | 0

| aceptada

Respondida
how can i read from matlab ".txt" file
This is working code that should be able to do what you want: function [header,ppv,pl,ps_d,ps_c,pg_i,pg_s,ppv_s,pl_s,soc_op...

casi 8 años hace | 1

Respondida
How to filter a binary matrix through a binary vector?
Here are two ways to do this: E = [0 1 1 0 0]; S = [1 1 0 1 0; 1 1 1 1 1; 1 0 0 1 1]; S_E=S(:,logical(E)); E = [...

casi 8 años hace | 0

| aceptada

Respondida
Do MATLAB licenses run through the expiry date?
The only authoritative answer can come from Mathworks themselves, but I don't think you're allowed to keep using the TAH license...

casi 8 años hace | 0

Cargar más