Answered
calculate the averages of non-squared matrix blocks
A = [1 0 2 0; 0 1 3 0 ; 1 1 0 0 ; 0 2 3 1 ; 3 2 3 0 ; 0 1 1 2 ; 3 1 0 2 ; 0 0 1 0 ; 2 1 ...

3 years ago | 0

Answered
how to index the stating position of something?
The code you have requires a few modifications to work. Try this - x1 = [1 0 2 3 8 5 6 7 0 0 0 0 0 2 5 3 0 0 6 4]; out1 = ...

3 years ago | 1

Answered
How do I include errorbar on my F1 score plot
Use errorbar - % Given data p = [3, 4, 5, 6, 7, 8, 9, 10, 11, 12]; TPR_PCA = [79.4, 80.25, 83, 90.50, 91.31, 91.34, 91.34, 9...

3 years ago | 0

Answered
How do i plot these kind of surfaces?
It shows in the image to take the real part of the functions, but your description says something different. The code below is ...

3 years ago | 0

| accepted

Answered
Loop to create a matrix with adding a constant value to a matrix
You can either Preallocate a zero array and add elements using ones or repelem via indexing. Obtain the final matrix via repe...

3 years ago | 0

| accepted

Answered
How to plot multiple time series data on single plot?
Add plots to existing axis legend

3 years ago | 0

Answered
Datatips does not work with rectangle
figure() %Draw the rectangle first rectangle('Position',[3 3 3 3],'FaceColor',[1 0 0]); %hold on - to add the plot to the s...

3 years ago | 0

| accepted

Answered
Assign value 1 to a position in a matrix
Assuming values of x_Pos and y_Pos are from xVec and yVec - xVec = [0:0.1:50]; % in m yVec = [0:0.1:45]; % in m Matrix = f...

3 years ago | 1

| accepted

Solved


Count the number of folds needed to pack a large sheet
In a certain paper factory, large sheets of paper are being made every day. Before sending the sheets for shipment, they have to...

3 years ago

Solved


Neural Net: Back Propagation of Quad Output with Bias, ReLU
This challenge is to return the WH_delta and WP_delta, given X, WH, WP, EPY using ReLU on the hidden layer and Softmax on the ou...

3 years ago

Solved


Neural Net: Back Propagation of Dual Output with Bias
This challenge is to return the WH_delta and WP_delta, given X, WH, WP, EPY using Sigmoid on the hidden layer and Softmax on the...

3 years ago

Solved


Neural Net: Calculate Bias Quad Output Perceptron (Counter, Mux, Subtraction)
This challenge is to calculate the Neural Net Bias Quad Output Perceptron vector, PY, and Pclass, given X, WH, and WP using ReL...

3 years ago

Solved


Neural Net: Calculate Bias Dual Output Perceptron (AND/NAND/OR/NOR/XOR/XNOR)
This challenge is to calculate the Neural Net Bias Dual Output Perceptron vector,PY and Pclass, given X, WH, and WP using Sigmoi...

3 years ago

Answered
The graph is not displayed
x0 = 100; r=1.02; %Bring the assignment out of loop, as it is not affected by the loop x = x0; %Define indices to loop ove...

3 years ago | 0

| accepted

Answered
Plot a 2-dimensional matrix with 2 different colormaps for negative and positive values
%Random data for example y = (-7:5)+(-7:5)'; %Get the maximum and minimum values of the array p = max(y,[],'all'); n = min...

3 years ago | 1

| accepted

Answered
How do you find a specific row a certain value is at in a matrix?
When you provide a numerical array to find, it gives the indices of all the nonzero values. And as Max_floor_2 is a non-zero sca...

3 years ago | 1

| accepted

Answered
Plotting simplenarx_dataset
simplenarx_dataset is a 1x100 cell array, with each cell element containing a numerica scalar. load simplenarx_dataset; data ...

3 years ago | 1

Answered
loglog plot, change yticks to non 10^ values. IS there a straight forward way like for xticks
"... but I'm confused as to why the yticks are so much more intricate than the xtick." I suspect it is becase the values to x-t...

3 years ago | 0

| accepted

Answered
How to display pi symbol in the output?
You can either use the symbolic math toolbox or print the symbol via the unicode value - nA=3.3;nB=2.25; % nB=3.3;nA=2.25; S...

3 years ago | 0

| accepted

Answered
How to replace the variable s with the complex variable jw?
Assuming you are working with symbolic variables, use symbolic substitution - subs

3 years ago | 0

Answered
How can I have automatic marker shapes for multiple curves
"The thing is the number of curves is an input I can vary, that's why I can't simply specify the shape of the markers for each c...

3 years ago | 1

Answered
MATLAB not computing integral of an infinite integral
Convert the symbolic functions to function handles, and use numerical integrals - P_l=50; v=0.1; k=15; Tm=1; T0=300; alph...

3 years ago | 0

| accepted

Answered
Is there any way to create 90 degree rose plot?
Adjust the theta limits - %Random data theta = atan2(rand(100000,1)-0.5,2*(rand(100000,1)-0.5)); polarhistogram(theta,25) ...

3 years ago | 1

Answered
Passing array as input to a function
If you perform colon operations with vectors to create regularly-spaced vectors, it will only take the 1st element of each vecto...

3 years ago | 0

Answered
What is Matlab online execution time affected by?
"so the simulations run entrirely on Matlab's cloud." Yes. "I typed system('cat /proc/cpuinfo') in the Matlab online window,...

3 years ago | 1

Answered
Change values of 'x-axis (bar graph) as integers
%Random data x = 0:4e4; y = x.^2-x; plot(x,y) figure plot(x,y) %Get x tick values t = xticks; %Create a string with ...

3 years ago | 0

| accepted

Answered
Cant seem understand the error in code
for loops need to be completed with "end". You initiated 2 for loops, but you only closed one. for i=1:size(I,1)-M for j=1...

3 years ago | 0

Answered
combine data into hourly-based data
There's no need of using find in the for loop load('data.mat') for i=1:24 %Comparison was incorrect id=data(:,2)>...

3 years ago | 0

Answered
I don't understand the failed test message
Hi @Nourhan, Cody moderator here As @Torsten mentions, that particular test case checks for some keywords, to see if they ar...

3 years ago | 0

| accepted

Answered
Magnifying a Segment of Plot in MATLAB Figure
Check this FEX submission - zoomPlot MathWorks Blog Post about zoomPlot

3 years ago | 0

Load more