Answered
how to search about a matrix in a cell?
Sarah's (OP) example: A={ ... [0;0] [0;1] [1;0] [0;0] }; counts=nnz(~cellfun(@any,A)) Gives: counts = 2 Stephen...

7 years ago | 0

Solved


Summing digits
Given n, find the sum of the digits that make up 2^n. Example: Input n = 7 Output b = 11 since 2^7 = 128, and 1 + ...

7 years ago

Solved


Generate a vector like 1,2,2,3,3,3,4,4,4,4
Generate a vector like 1,2,2,3,3,3,4,4,4,4 So if n = 3, then return [1 2 2 3 3 3] And if n = 5, then return [1 2 2...

7 years ago

Answered
How I can remove n smallest values in table?
idx=sort(T{3,:}) % where T is your table T(:,ismember(T{3,:},idx(1:3))) =[ ]

7 years ago | 0

| accepted

Answered
Use a loop to load .dat files and recreate a new one
Use readtable() to read the file. See https://www.mathworks.com/help/matlab/import_export/process-a-sequence-of-files.html

7 years ago | 0

Solved


Create times-tables
At one time or another, we all had to memorize boring times tables. 5 times 5 is 25. 5 times 6 is 30. 12 times 12 is way more th...

7 years ago

Answered
How to extract value from some row or column in a matrix
By indexing like shown below: % if A is a matrix A=rand(100); % fake data B=A([1:10 25:35],:) % extracts specified rows B=A(...

7 years ago | 0

| accepted

Answered
Problem with quotation marks (')
Eval is evil ( https://www.mathworks.com/matlabcentral/answers/304528-tutorial-why-variables-should-not-be-named-dynamically-eva...

7 years ago | 0

| accepted

Answered
Differential System Of Equations
ic = [1;0;0]; % initial conditions tspan = [0 20]; [t,x]=ode45(@myod,tspan,ic); % function call when_t_is_20 = x(t==20,:) %...

7 years ago | 0

Answered
MATLAB stuck on launch window
Contact Mathworks Support Team by clicking the Contact Us button on the top right corner of this page.

7 years ago | 0

| accepted

Answered
how do you save a workspace in high school version. ours does not have the editor tab
https://www.mathworks.com/help/matlab/ref/save.html#description - save() does the job Workspace can be shown by typing worksp...

7 years ago | 0

Answered
How can I place R2 (x, y) points on a plot (a mark) ?
plot([0,-1,-1,0,0,1,1,0],[-1,0,0,1,1,0,0,-1],'k')

7 years ago | 0

Answered
i need to know from where i can get the license number
https://www.mathworks.com/matlabcentral/answers/440262-what-is-my-id#answer_356858

7 years ago | 0

Answered
readtable is jumping to a new row after delimiter
readtable('sample.txt','delimiter','\n','ReadVariableNames',0)

7 years ago | 1

Answered
open and edit .dat file and then save it keeping the same format
use readtable() to read the file or dlmread() which version of matlab are you using?

7 years ago | 0

Answered
Year in column 1 and month in column 2
Perhaps? t=datetime(2017,01,01):calmonths(1):datetime(2017,12,31); [year,month,~]=ymd(t); Result=[year(:) month(:)]

7 years ago | 0

Answered
'for loop' summation containing symbolic variable
Use symsum() straight away instead of loop.

7 years ago | 0

Answered
ナイキスト線図やボード線図のタイトルを消したい
https://www.mathworks.com/matlabcentral/answers/99627-how-do-i-remove-the-title-and-ylabel-for-a-nyquist-or-bode-plot-in-matlab-...

7 years ago | 3

Answered
Undefined function 'writePosition' for input arguments of type 'double'
change function interval(x) to function interval

7 years ago | 0

Answered
how to concatenate multiple matrix files into a single file
https://www.mathworks.com/help/matlab/import_export/process-a-sequence-of-files.html finally use vertcat() or horzcat() to con...

7 years ago | 0

Answered
How can I know the line color which is matched certain value in a graph ?
clear all; close all; data=xlsread('practice.xlsx'); f=2:2:50; C={'r','g','m','k','y','b','-or','-og','-om','-ok','-oy','-...

7 years ago | 0

Answered
Replacing the row and column number with names for a matrix
one way (as cells) : X=num2cell(X); X(1,:)=Names(1,:) % result as cells % ^^^^^^^^^^------ 1 X 132 cell array containing...

7 years ago | 0

Answered
Construct a matrix, s6, by subtracting 6 from every 5 elements of s starting from 20th element.
https://www.mathworks.com/company/newsletters/articles/matrix-indexing-in-matlab.html - read it

7 years ago | 0

| accepted

Answered
text editing commands error
doc fprintf % see the examples there

7 years ago | 0

Answered
How can I place R2 (x, y) points on a plot (a mark) ?
The first point in each variable represents x and the next y , put all the variables in a matrix named R2 by vertically concaten...

7 years ago | 0

| accepted

Answered
error using sym/solve and maplemex
I was not able to reproduce that error , do you have a valid license for it ? license('test','symbolic_toolbox') % should retu...

7 years ago | 0

Answered
Copying values between two index number
https://www.mathworks.com/matlabcentral/answers/440210-how-can-i-copy-a-column-i-already-have-and-add-it-on-to-the-end-of-my-mat...

7 years ago | 0

Load more