Answered
Repeat array onto the same row
Here's a generalised code - A=[1,2,3,4]; B = repetition(A,2) B = repetition(A,1.5) B = repetition(A,2.75) B = repetition...

14 days ago | 1

Answered
LCM seems broken. What am I missing?
"What am I missing?" You are expecting it to work a particular way. You looked up an example from the documentation page of l...

14 days ago | 1

| accepted

Answered
How can I solve for specific complex solutions?
Starting with the basics - solving for a real number can be achieved by solving for imaginary part equal to 0. syms ue ye = (5...

14 days ago | 0

Answered
merge multiple cells in only one
As you want the final result to be a 4x1 cell array - mat1 = load('value1.mat'); value1 = mat1.value1; mat2 = load('value2.m...

15 days ago | 0

| accepted

Answered
Creating results from multiple for loops
Do you mean like this - A1 = 0:1:5; A2 = 0:1:5; a = 0:0.1:1; a = shiftdim(a,-1); %or %a = permute(a,[2 3 1]); o...

15 days ago | 0

| accepted

Answered
identify specific unique columns in a cell array
Here's one approach - %Input Stations = {'CID' 'C17E' 'C17E' 200 "2016/9/12" "14:46:6" 0 'CID' 'BC54' 'BC54' 200...

15 days ago | 0

| accepted

Answered
How to zoom in to a particular point of an image?
Based on this comment by OP Previous similar questions on MATLAB Answers - https://in.mathworks.com/matlabcentral/answers/337...

15 days ago | 1

| accepted

Answered
extract all rows of a matrix except 'r' (vector) rows
matrix = [54; 55; 56; 57; 58; 59; 60; 61; 62; 63; 64; 65]; r = [1; 2; 3; 4; 9]; %Method 1 %remove directly matrix(r,:)=[];...

15 days ago | 2

Answered
How to Count No of Time Word Repeat from UI Table Data in app Designer ?
Use histcounts on the column - CAN Channel.

15 days ago | 0

Answered
Any knows why a second line appears in the bottom x-axis?
"Anyone knows a better way to add a right y-axis?" Try yyaxis

15 days ago | 0

| accepted

Answered
Identify Duplicate values in an array and replace with Nan
Here's a much faster and simpler approach - array = [2.3930, 0, 6.1680; 2.3872, 0, 6.1680; 2.3848, 0, 6.17...

16 days ago | 0

Answered
fill color in stairs plot
data1=rand(96,1); %random number with 96*1 avg=mean(data1); %Get the x and y coordinates corresponding to the stairs plot [...

16 days ago | 1

| accepted

Answered
trying to loop for transfer function plots into single figure
%Do not name variables dynamically %defining them in an array and using indexing is a much better option Km = [0.01 0.02257 0....

16 days ago | 0

| accepted

Answered
For loop that executes data from an excel file, your mission should you choose to accept it
"I need help understanding how to write a simple for loop that executes that" A basic idea will be - 1 - Read the data via re...

17 days ago | 1

Answered
how to repeat a function after fixed interval?
Like this? incr = 0.01; t = (0:incr:1)'; y = 2*(6*t).^(1/2); %For 100, the plot looks quite cramped val=10; t0 = (0:va...

17 days ago | 1

Answered
Function out of proportion/wrong while in matlab?
You have to define the x-range over which you want to plot the function. The default range is [-5,5] - Refer to the documentati...

18 days ago | 1

| accepted

Answered
When does an anonymous function reach a specified value?
It's not possible to determine the exact value which satisfies the condition you have stated, but you can get an approximate val...

18 days ago | 0

Answered
How to define partial fraction expansion?
"I would see the function: F_residue = 1 - 3/(s+2) so as a sum of terms" One method would be to use symbolic variables (N...

18 days ago | 1

Answered
Array indices must be positive integers or logical values.
if norm(eta1(n) - eta1(n-1)) < tol break; if norm(eta2(n) - eta2(n-1)) < tol break; % Convergence reached...

18 days ago | 0

Answered
operation with logical array
c=[0 0 0 0]; a=[1 0 1 0]; b=[0 1 1 0]; c = (a==0)&(b==1) %simplified c = (~a)&b Given the questions you have asked recen...

19 days ago | 0

| accepted

Answered
How to take input from user for row number and then use it for selecting the specific excel row
1 - Use input to get user input 2 - Use sprintf to obtain the string %Example, where 'in' is the variable used to store user i...

19 days ago | 0

| accepted

Answered
legend in for loop
If you only want to plot for the values in temp_grain, use it as the loop index - temp_grain=[26 34 42]; figure() hold on...

19 days ago | 0

| accepted

Answered
convert from cell array to double
Use indexing - %Assuming this is how your data is stored b = {{6,4}} c = b{1}{2}

20 days ago | 0

| accepted

Answered
trying to find main diagonal of a matrix for cholesky method
%Random data n = 5; %input ("dimensão do sistema:"); %dimension of system for the matrix A = magic(5); %input("entre com a mat...

20 days ago | 0

| accepted

Answered
What are the specifics of MATLAB home license?
Note - It is always best to contact the sales department for information regarding products offered by The MathWorks - Contact S...

20 days ago | 0

| accepted

Answered
Apply a color to a slice of the pie chart
"I applied white color [1 1 1]." Your code doesn't match what you say. You have divided the values by 255, which is doesn't cor...

20 days ago | 0

| accepted

Answered
Plot a line parallel to map axis
Answer according to the information available - figure %Create map axes mx1 = mapaxes; land = readgeotable("landareas.shp");...

21 days ago | 0

| accepted

Answered
how to organise data in an Excel spreadsheet
Look into - findgroups groupsummary splitapply rowfun This documentation page has a good amount of examples related to wh...

22 days ago | 1

| accepted

Answered
Why xlsread() not reading some data
You are using colon, :, which is used for creating vectors. Cell31 = 'D1'; Cell32 = 'E96432'; Range3=Cell31:Cell32 What yo...

22 days ago | 0

| accepted

Answered
How to transform a table to a matrix?
"I'm only interested to use the numbers from row 14 to 514." You can utilize the range functionality of readmatrix - %Specifi...

22 days ago | 1

Load more