Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8447049
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T10:05:22+00:00 2026-06-10T10:05:22+00:00

I have problem to change value matrix in specific depth R = 6; C

  • 0

I have problem to change value matrix in specific “depth”

R = 6;
C = 12;
depth = 6

for j=1:depth;
    result(:,:,j)=randint(R,C,[0 2])
    for i=1:R,
        A(i,:,j)=randperm(C);
    end
end

this following code that i have used currently
but this code only still work from 1th depth. then, I wish that my code would be work from 3th depth (h=3:depth).

for h=3:depth;       
    idx = bitand(A(:,:,h)>= 1, A(:,:,h)<= 4); 
    result([false(size(idx,1),1) idx(:,1:end-1)]) = 3
    result(idx)=1
end

anyone have suggestion to improve that code??

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T10:05:23+00:00Added an answer on June 10, 2026 at 10:05 am

    This question is quite vague. If all you want to know is how 3D indexing is working, you can
    play around with the following code:

    %# Construct A and result.
    result = rand(R, C, depth);
    A = 10 * rand(R, C, depth);
    
    idx = (A >= 1) & (A <= 3);
    result([false(size(A, 1), 1, size(A, 3)) idx(:,1:end-1,:)]) = 1; %# or 3??
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following problem: I would like to change value of ExpandableListView's cell
I have a problem to dismiss my progbar and to change to view that
I have a problem, I need to change body of method when this class
I have this problem in my SlashDot Menu. I want to change the picture
I've been have trouble understand this problem. If I change the variable name fifthViewController
Hi community I have the following problem, given this xml <test> <comp> <id>1</id> <content>bar</content>
I have problem with remove() method. I can't remove $(this) object. My code is:
I have problem with this: RewriteEngine On RewriteRule ^tuote/([^/]+) tuote.php?data=$1 [L] it should change
I have the problem how to change boolean value of a given class so
I have problem with c# script who change user AD password, when try change

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.