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

quasi 8 anni fa | 2

| accettato

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

quasi 8 anni fa | 0

| accettato

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

quasi 8 anni fa | 2

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

quasi 8 anni fa | 1

| accettato

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

quasi 8 anni fa | 0

| accettato

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

quasi 8 anni fa | 0

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

quasi 8 anni fa | 0

| accettato

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

quasi 8 anni fa | 0

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

quasi 8 anni fa | 0

| accettato

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

quasi 8 anni fa | 0

| accettato

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

quasi 8 anni fa | 2

| accettato

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

quasi 8 anni fa | 0

| accettato

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

quasi 8 anni fa | 0

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

quasi 8 anni fa | 0

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

quasi 8 anni fa | 0

| accettato

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

quasi 8 anni fa | 2

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

quasi 8 anni fa | 1

| accettato

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

quasi 8 anni fa | 1

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

quasi 8 anni fa | 0

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

quasi 8 anni fa | 0

| accettato

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

quasi 8 anni fa | 0

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

quasi 8 anni fa | 0

| accettato

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

quasi 8 anni fa | 1

| accettato

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

quasi 8 anni fa | 0

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

quasi 8 anni fa | 0

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

quasi 8 anni fa | 4

| accettato

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

quasi 8 anni fa | 0

| accettato

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

quasi 8 anni fa | 1

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

quasi 8 anni fa | 0

| accettato

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

quasi 8 anni fa | 0

Carica altro