Category: News
Microsoft Build 2024: Essential Guide for AI Developers at Startups and Cloud-Native Companies
Microsoft Build 2024 starts May 21st. Register now to attend virtually.
Microsoft Build, the annual conference where developers can dive deep into the latest Microsoft technologies, kicks off May 21st. Generative AI is rapidly evolving. Take for example, the recent launch of OpenAI’s GPT-4o. In addition to major improvements in performance on features such as multilingual understanding, faster response times, and lower cost, the model features a massive leap in multimodal capabilities by processing and generating content across text, audio, and images in real time, unlocking a new class of Generative AI (GenAI) use cases. And that’s just OpenAI. There is a plethora of cutting-edge solutions providing models, frameworks, vector databases, LLM observability platforms, and many more tools for developers building GenAI apps.
Microsoft has been an early innovator in the GenAI wave and has been recognized as a leader in the 2024 Gartner Magic Quadrant for Cloud AI Developer Services. In addition to Azure AI services, Microsoft also provides the tools and the application platform comprising databases, cloud-native services, and infrastructure services, that enable developers to easily and quickly build, deploy, and run powerful GenAI applications securely and at-scale. With businesses of all sizes and verticals leveraging GenAI to create differentiated customer experiences and drive operational excellence, every developer will need to be skilled in building AI-powered apps. Microsoft Build will provide an opportunity to skill up and learn about the latest developments in GenAI.
The Build blueprint for startups and at-scale born-in-the-cloud companies
Startups and cloud-first companies are leading the GenAI innovation boom. They are building GenAI-powered apps across a range of industries such as healthcare, financial services, and retail. While it is still early days for GenAI, these companies are already making a big impact on how businesses interact with their customers. For example, Harvey is leveraging the power of Azure OpenAI and Azure Kubernetes Service (AKS) to enable better efficiency and productivity for legal professionals.
Many startups are boosting GenAI momentum by providing solutions that make it easy to build GenAI applications. Two examples of such startups are Scale AI and Aisera. The Scale GenAI Platform (SGP) enables enterprises to bridge the trust gap to deploy safe and performant GenAI applications through better data. With features like Evaluation, Auto-Rag Builder, and Custom Application Builder, SGP combines trust with velocity to accelerate enterprises’ paths to real ROI. Aisera leverages Azure OpenAI and AKS to provide a generative AI platform for enterprises to help them automate and enhance customer service interactions, employee service desk, content generation , workflow generation and many other industries/domains and many other tasks.
Top Microsoft Build 2024 Keynotes and Breakouts for Startups
At Microsoft Build, you will hear from many such startups, as well as enterprises, on their GenAI use cases and application development. Now let’s take a look at the keynotes, sessions, and other learning opportunities that will help you dive deep with GenAI.
Quick pro tip: You can go to the session catalog and put “born-in-the-cloud” in the search bar to see the content we have curated for you. Also note that the scheduling for some of the sessions might overlap, but you should be able to view many of these on-demand.
Microsoft Build 2024 Keynotes
Microsoft Build opening keynote (May 21, 9-11am PST): Satya Nadella, CEO Microsoft, will be joined by Kevin Scott, CTO, and Rajesh Jha, EVP Experiences and Devices, to talk about how this era of AI will unlock new opportunities, transform how developers work and drive business productivity across industries.
Next generation AI for developers with the Microsoft Cloud (May 22, 8.30-10am PST): Join Scott Guthrie and leaders across Microsoft to learn how you can build secure and responsible AI solutions of the future with the foundation of the Microsoft Cloud. Watch this for exciting AI-related announcements!
Top 10 Microsoft Build Breakout Sessions
(ordered by scheduling):
Maximize joy, minimize toil with great developer experiences (May 21, 1-1.45pm PST). Reason to watch: Empowering developers is the first step to building great GenAI apps. Join Amanda Silver, CVP Developer Division, as she covers the latest evolution in developer tools and how we collaborate across the entire technology spectrum to build the next generation of intelligent apps.
Multimodel, multimodal, and multiagent innovation with Azure AI (May 21, 2.15-3pm PST). Reason to watch: Multimodal use cases are quickly becoming popular in GenAI applications and Marco Casaliana, VP Products Azure AI, gives the best demos to show what’s possible! Additionally, the session will discuss responsible AI, data privacy, and security and feature customer examples such as Unity Technologies.
Operationalize AI Responsibly with Azure AI Studio (May 21, 3.30-4.15pm PST). Reason to watch: Azure AI Studio is the go-to service on Azure for building generative AI apps. Sarah Bird, CPO at Microsoft for Responsible AI, will discuss in detail how you can take an agile, responsible-by-design approach to building GenAI apps on Azure.
Build and scale modern apps with Azure Kubernetes Service (May 22, 10.30-11.15am PST). Reason to watch: Kubernetes has become the go-to platform for running apps at scale, especially in the cloud and Azure Kubernetes Service now makes it even easier to deploy and run AI apps at scale. ClickHouse will share how they are using AKS and Azure to build ClickHouse Cloud, a hosted version of the world’s fastest and most resource-efficient online analytical column-oriented database management system.
RAG at scale: Production-ready GenAI apps with Azure AI Search (May 22, 10.30-11.15am PST). Reason to watch: If 2023 was the year of GenAI prototypes, 2024 is the year these apps go into production. Developers are increasingly turning to Retrieval Augmented Generation (RAG) to improve the quality of search results for their GenAI apps. In this session Pablo Castro, Distinguished Engineer, will demo how Azure AI Search combines the best RAG capabilities for GenAI apps at any scale, without compromising cost or performance.
Building applications at hyperscale with the latest Azure innovations (May 22, 1-1.45pm PST). Reason to watch: This is a great foundational session on building cloud-native Linux-based scale out applications on Azure infrastructure and will dive into the different VM types and pricing models available to achieve your performance and cost requirements.
Design and build multi-tenant SaaS apps at scale with Azure CosmosDB (May 22, 3.30-4.15pm PST). Reason to watch: Azure CosmosDB is a database built for the era of AI. The world’s most popular GenAI app, ChatGPT, uses Azure CosmosDB. It features built-in security and compliance, essential for business-critical genAI apps, and is available in many variants including PostgreSQL, MongoDB, and Apache Cassandra. Real-world examples from innovative ISVs like Kinectify will provide practical insights.
Serverless architectures: Effortless intelligent apps at extreme scale (May 22, 4.45-5.30pm PST). Reason to watch: Serverless application architectures are becoming increasingly popular and Azure Container Apps and Azure Functions make it easy to build and run serverless GenAI apps at scale.
Transforming the future of startups with Microsoft AI (May 23, 4.15-5pm PST). Reason to watch: Learn about how Microsoft for Startups is helping founders around the world build their AI solutions on the Microsoft Cloud. Hear from the founders at Nixtla on how access to AI infrastructure including GPUs paired with cutting edge AI tooling has transformed their businesses.
Disrupt and grow with Azure AI (On Demand). Reason to watch: If you are new to Azure, watch this on-demand session to learn about the full stack of Azure services that help you build, run, and scale your GenAI apps. Winston Weinberg, CEO, and Gabe Pereyra, President and Cofounder at Harvey will talk about their experience in building GenAI solutions for professional services.
Additional Microsoft Build Learning Opportunities:
These are just a few sessions I recommend, and I’ve picked them by solution breadth, speaker profiles, and common use cases. There are many more sessions packed with great information, and your watch list should be based on the models, use cases, and tools you use. I highly recommend checking out the session catalog to discover sessions that are most relevant to you.
In addition to breakout sessions, there are also demos and many more learning opportunities at Build. We’ve also put together a comprehensive learning collection on “Essentials for building new intelligent apps” to help you kick off your learning journey on Azure.
We recently hosted the Microsoft Generative AI Hackathon and got some great submissions with interesting use cases for GenAI. Many of the submissions were also projects related to social good and sustainability, which showcases how AI can be a force multiplier for good. Check out the hackathon submissions and winners here.
Let’s learn and build!
This is truly the era of AI and cloud-first companies are at the forefront of this wave. Join us at Microsoft Build 2024 and let’s build the future together!
Additional Microsoft Resources:
Microsoft Azure
Microsoft for Startups Founders Hub
Digital Natives on Azure
Try Azure for free
Microsoft Tech Community – Latest Blogs –Read More
How can I make the layout in the attached image with tiledlayout
I am able to get plot 1 and plot 2 in but not 3, 4 and 5. I can also get 3, 4 and 5 in without plot 1 and 2 but that is not what I want, per the attached image.I am able to get plot 1 and plot 2 in but not 3, 4 and 5. I can also get 3, 4 and 5 in without plot 1 and 2 but that is not what I want, per the attached image. I am able to get plot 1 and plot 2 in but not 3, 4 and 5. I can also get 3, 4 and 5 in without plot 1 and 2 but that is not what I want, per the attached image. tiledlayout MATLAB Answers — New Questions
How to fix java.lang.ClassNotFoundException: com.mathworks.toolbox.javabuilder.MWException?
I have a RESTful API project where I use Spring Boot Maven. I’m also processing in Matlab with a jar file. I converted this project to .jar file, but running it with java -jar demo.jar closes after running. I got some errors. However, since it was a restful API, it had to remain open so that I could access the APIs.
In VS Code Java: Java 11
Matlab: R2018a, JRE 1.8
Errors that are related to Matlab also, after java -jar demo.jar:
Error starting ApplicationContext. To display the conditions report re-run your application with ‘debug’ enabled.
2023-10-02 11:21:51.075 ERROR 11484 — [ main] o.s.boot.SpringApplication : Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘beso3D_PD’: Lookup method resolution failed; nested exception is java.lang.IllegalStateException: Failed to introspect Class [peridynamics.Beso3D_PD] from ClassLoader [org.springframework.boot.loader.LaunchedURLClassLoader@1ed6993a]
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.determineCandidateConstructors(AutowiredAnnotationBeanPostProcessor.java:298) ~[spring-beans-5.3.30.jar!/:5.3.30]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineConstructorsFromBeanPostProcessors(AbstractAutowireCapableBeanFactory.java:1302) ~[spring-beans-5.3.30.jar!/:5.3.30]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1219) ~[spring-beans-5.3.30.jar!/:5.3.30]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582) ~[spring-beans-5.3.30.jar!/:5.3.30]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.30.jar!/:5.3.30]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.30.jar!/:5.3.30]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.30.jar!/:5.3.30]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.30.jar!/:5.3.30]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.30.jar!/:5.3.30]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:955) ~[spring-beans-5.3.30.jar!/:5.3.30]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:921) ~[spring-context-5.3.30.jar!/:5.3.30]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583) ~[spring-context-5.3.30.jar!/:5.3.30]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:147) ~[spring-boot-2.7.16.jar!/:2.7.16]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:731) ~[spring-boot-2.7.16.jar!/:2.7.16]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:408) ~[spring-boot-2.7.16.jar!/:2.7.16]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:307) ~[spring-boot-2.7.16.jar!/:2.7.16]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1303) ~[spring-boot-2.7.16.jar!/:2.7.16]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1292) ~[spring-boot-2.7.16.jar!/:2.7.16]
at peridynamics.demoApp.main(demoApp.java:11) ~[classes!/:0.0.1-SNAPSHOT]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49) ~[demo1-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT]
at org.springframework.boot.loader.Launcher.launch(Launcher.java:108) ~[demo1-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT]
at org.springframework.boot.loader.Launcher.launch(Launcher.java:58) ~[demo1-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT]
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:65) ~[demo1-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT]
Caused by: java.lang.IllegalStateException: Failed to introspect Class [peridynamics.Beso3D_PD] from ClassLoader [org.springframework.boot.loader.LaunchedURLClassLoader@1ed6993a]
at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:485) ~[spring-core-5.3.30.jar!/:5.3.30]
at org.springframework.util.ReflectionUtils.doWithLocalMethods(ReflectionUtils.java:321) ~[spring-core-5.3.30.jar!/:5.3.30]
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.determineCandidateConstructors(AutowiredAnnotationBeanPostProcessor.java:276) ~[spring-beans-5.3.30.jar!/:5.3.30]
… 26 common frames omitted
Caused by: java.lang.NoClassDefFoundError: com/mathworks/toolbox/javabuilder/MWException
at java.base/java.lang.Class.getDeclaredMethods0(Native Method) ~[na:na]
at java.base/java.lang.Class.privateGetDeclaredMethods(Class.java:3402) ~[na:na]
at java.base/java.lang.Class.getDeclaredMethods(Class.java:2504) ~[na:na]
at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:467) ~[spring-core-5.3.30.jar!/:5.3.30]
… 28 common frames omitted
Caused by: java.lang.ClassNotFoundException: com.mathworks.toolbox.javabuilder.MWException
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:445) ~[na:na]
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:587) ~[na:na]
at org.springframework.boot.loader.LaunchedURLClassLoader.loadClass(LaunchedURLClassLoader.java:151) ~[demo1-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT]
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[na:na]
… 32 common frames omitted
How to solve this problem?I have a RESTful API project where I use Spring Boot Maven. I’m also processing in Matlab with a jar file. I converted this project to .jar file, but running it with java -jar demo.jar closes after running. I got some errors. However, since it was a restful API, it had to remain open so that I could access the APIs.
In VS Code Java: Java 11
Matlab: R2018a, JRE 1.8
Errors that are related to Matlab also, after java -jar demo.jar:
Error starting ApplicationContext. To display the conditions report re-run your application with ‘debug’ enabled.
2023-10-02 11:21:51.075 ERROR 11484 — [ main] o.s.boot.SpringApplication : Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘beso3D_PD’: Lookup method resolution failed; nested exception is java.lang.IllegalStateException: Failed to introspect Class [peridynamics.Beso3D_PD] from ClassLoader [org.springframework.boot.loader.LaunchedURLClassLoader@1ed6993a]
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.determineCandidateConstructors(AutowiredAnnotationBeanPostProcessor.java:298) ~[spring-beans-5.3.30.jar!/:5.3.30]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineConstructorsFromBeanPostProcessors(AbstractAutowireCapableBeanFactory.java:1302) ~[spring-beans-5.3.30.jar!/:5.3.30]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1219) ~[spring-beans-5.3.30.jar!/:5.3.30]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582) ~[spring-beans-5.3.30.jar!/:5.3.30]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.30.jar!/:5.3.30]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.30.jar!/:5.3.30]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.30.jar!/:5.3.30]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.30.jar!/:5.3.30]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.30.jar!/:5.3.30]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:955) ~[spring-beans-5.3.30.jar!/:5.3.30]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:921) ~[spring-context-5.3.30.jar!/:5.3.30]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583) ~[spring-context-5.3.30.jar!/:5.3.30]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:147) ~[spring-boot-2.7.16.jar!/:2.7.16]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:731) ~[spring-boot-2.7.16.jar!/:2.7.16]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:408) ~[spring-boot-2.7.16.jar!/:2.7.16]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:307) ~[spring-boot-2.7.16.jar!/:2.7.16]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1303) ~[spring-boot-2.7.16.jar!/:2.7.16]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1292) ~[spring-boot-2.7.16.jar!/:2.7.16]
at peridynamics.demoApp.main(demoApp.java:11) ~[classes!/:0.0.1-SNAPSHOT]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49) ~[demo1-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT]
at org.springframework.boot.loader.Launcher.launch(Launcher.java:108) ~[demo1-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT]
at org.springframework.boot.loader.Launcher.launch(Launcher.java:58) ~[demo1-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT]
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:65) ~[demo1-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT]
Caused by: java.lang.IllegalStateException: Failed to introspect Class [peridynamics.Beso3D_PD] from ClassLoader [org.springframework.boot.loader.LaunchedURLClassLoader@1ed6993a]
at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:485) ~[spring-core-5.3.30.jar!/:5.3.30]
at org.springframework.util.ReflectionUtils.doWithLocalMethods(ReflectionUtils.java:321) ~[spring-core-5.3.30.jar!/:5.3.30]
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.determineCandidateConstructors(AutowiredAnnotationBeanPostProcessor.java:276) ~[spring-beans-5.3.30.jar!/:5.3.30]
… 26 common frames omitted
Caused by: java.lang.NoClassDefFoundError: com/mathworks/toolbox/javabuilder/MWException
at java.base/java.lang.Class.getDeclaredMethods0(Native Method) ~[na:na]
at java.base/java.lang.Class.privateGetDeclaredMethods(Class.java:3402) ~[na:na]
at java.base/java.lang.Class.getDeclaredMethods(Class.java:2504) ~[na:na]
at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:467) ~[spring-core-5.3.30.jar!/:5.3.30]
… 28 common frames omitted
Caused by: java.lang.ClassNotFoundException: com.mathworks.toolbox.javabuilder.MWException
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:445) ~[na:na]
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:587) ~[na:na]
at org.springframework.boot.loader.LaunchedURLClassLoader.loadClass(LaunchedURLClassLoader.java:151) ~[demo1-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT]
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[na:na]
… 32 common frames omitted
How to solve this problem? I have a RESTful API project where I use Spring Boot Maven. I’m also processing in Matlab with a jar file. I converted this project to .jar file, but running it with java -jar demo.jar closes after running. I got some errors. However, since it was a restful API, it had to remain open so that I could access the APIs.
In VS Code Java: Java 11
Matlab: R2018a, JRE 1.8
Errors that are related to Matlab also, after java -jar demo.jar:
Error starting ApplicationContext. To display the conditions report re-run your application with ‘debug’ enabled.
2023-10-02 11:21:51.075 ERROR 11484 — [ main] o.s.boot.SpringApplication : Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘beso3D_PD’: Lookup method resolution failed; nested exception is java.lang.IllegalStateException: Failed to introspect Class [peridynamics.Beso3D_PD] from ClassLoader [org.springframework.boot.loader.LaunchedURLClassLoader@1ed6993a]
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.determineCandidateConstructors(AutowiredAnnotationBeanPostProcessor.java:298) ~[spring-beans-5.3.30.jar!/:5.3.30]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineConstructorsFromBeanPostProcessors(AbstractAutowireCapableBeanFactory.java:1302) ~[spring-beans-5.3.30.jar!/:5.3.30]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1219) ~[spring-beans-5.3.30.jar!/:5.3.30]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582) ~[spring-beans-5.3.30.jar!/:5.3.30]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.30.jar!/:5.3.30]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.30.jar!/:5.3.30]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.30.jar!/:5.3.30]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.30.jar!/:5.3.30]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.30.jar!/:5.3.30]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:955) ~[spring-beans-5.3.30.jar!/:5.3.30]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:921) ~[spring-context-5.3.30.jar!/:5.3.30]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583) ~[spring-context-5.3.30.jar!/:5.3.30]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:147) ~[spring-boot-2.7.16.jar!/:2.7.16]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:731) ~[spring-boot-2.7.16.jar!/:2.7.16]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:408) ~[spring-boot-2.7.16.jar!/:2.7.16]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:307) ~[spring-boot-2.7.16.jar!/:2.7.16]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1303) ~[spring-boot-2.7.16.jar!/:2.7.16]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1292) ~[spring-boot-2.7.16.jar!/:2.7.16]
at peridynamics.demoApp.main(demoApp.java:11) ~[classes!/:0.0.1-SNAPSHOT]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49) ~[demo1-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT]
at org.springframework.boot.loader.Launcher.launch(Launcher.java:108) ~[demo1-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT]
at org.springframework.boot.loader.Launcher.launch(Launcher.java:58) ~[demo1-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT]
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:65) ~[demo1-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT]
Caused by: java.lang.IllegalStateException: Failed to introspect Class [peridynamics.Beso3D_PD] from ClassLoader [org.springframework.boot.loader.LaunchedURLClassLoader@1ed6993a]
at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:485) ~[spring-core-5.3.30.jar!/:5.3.30]
at org.springframework.util.ReflectionUtils.doWithLocalMethods(ReflectionUtils.java:321) ~[spring-core-5.3.30.jar!/:5.3.30]
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.determineCandidateConstructors(AutowiredAnnotationBeanPostProcessor.java:276) ~[spring-beans-5.3.30.jar!/:5.3.30]
… 26 common frames omitted
Caused by: java.lang.NoClassDefFoundError: com/mathworks/toolbox/javabuilder/MWException
at java.base/java.lang.Class.getDeclaredMethods0(Native Method) ~[na:na]
at java.base/java.lang.Class.privateGetDeclaredMethods(Class.java:3402) ~[na:na]
at java.base/java.lang.Class.getDeclaredMethods(Class.java:2504) ~[na:na]
at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:467) ~[spring-core-5.3.30.jar!/:5.3.30]
… 28 common frames omitted
Caused by: java.lang.ClassNotFoundException: com.mathworks.toolbox.javabuilder.MWException
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:445) ~[na:na]
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:587) ~[na:na]
at org.springframework.boot.loader.LaunchedURLClassLoader.loadClass(LaunchedURLClassLoader.java:151) ~[demo1-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT]
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[na:na]
… 32 common frames omitted
How to solve this problem? matlab, spring boot, mwexception MATLAB Answers — New Questions
Kerberos Issues Windows Server 2016
Hi team,
I have been working on a Kerberos issue, Event ID 4 for a little over 2 months now. I have gone through all of the articles that I have found via Google and have the problem down to communications between two servers that I just cannot get to play nice. We have 3 locations on three separate islands in Hawaii. I have all three locations connected via Sonicwall Site-to-Site VPN. DNS is confirmed working. All three sites have DC present and syncronizing AD across the VPN. I have a site on Kauai that is the target server in the log files I will post and a site on Maui which is the client in the logs. I can run klist ticket on the Kauai server but when I run Klist on the Maui server, I get only the following:
C:Usersadministrator.MYDOMAIN>klist
Credentials cache C:Usersadministrator.MYDOMAINkrb5cc_administrator not found.
When I run klist ticket, I get the following:
C:Usersadministrator.MYDOMAIN>klist ticket
Usage: klist [[-c] [-f] [-e] [-a [-n]]] [-k [-t] [-K]] [name]
name name of credentials cache or keytab with the prefix. File-based cache or keytab’s prefix is FILE:.
-c specifies that credential cache is to be listed
-k specifies that key tab is to be listed
options for credentials caches:
-f shows credentials flags
-e shows the encryption type
-a shows addresses
-n do not reverse-resolve addresses
options for keytabs:
-t shows keytab entry timestamps
-K shows keytab entry key value
-e shows keytab entry key type
The Event Logs are littered with these errors:
The Kerberos client received a KRB_AP_ERR_MODIFIED error from the server eskimo-server09$. The target name used was E3514235-4B06-11D1-AB04-00C04FC2DCD2/1e6f523a-ac4d-4045-a2fc-4fab4d338d6e/MYDOMAIN@MYDOMAIN This indicates that the target server failed to decrypt the ticket provided by the client. This can occur when the target server principal name (SPN) is registered on an account other than the account the target service is using. Ensure that the target SPN is only registered on the account used by the server. This error can also happen if the target service account password is different than what is configured on the Kerberos Key Distribution Center for that target service. Ensure that the service on the server and the KDC are both configured to use the same password. If the server name is not fully qualified, and the target domain (MYDOMAIN) is different from the client domain (MYDOMAIN), check if there are identically named server accounts in these two domains, or use the fully-qualified name to identify the server.
From the client server on Maui I have run setspn -D E3514235-4B06-11D1-AB04-00C04FC2DCD2/1e6f523a-ac4d-4045-a2fc-4fab4d338d6e/MYDOMAIN@MYDOMAIN KauaiServer$
And re-registered it with setspn -S E3514235-4B06-11D1-AB04-00C04FC2DCD2/1e6f523a-ac4d-4045-a2fc-4fab4d338d6e/MYDOMAIN@MYDOMAIN KauaiServer$
I have queried for duplicate SPN’s in the domain and there aren’t any listed. In fact, after deleting the record and querying the domain for the record, the client server reports that NO SUCH SPN Found.
So I have two issues that I am trying to solve.
1) klist.exe seems to not be working on the client server
2) The Error Event ID 4 on the client with the Kauai Server.
Thanks for any help you can provide.
Hi team, I have been working on a Kerberos issue, Event ID 4 for a little over 2 months now. I have gone through all of the articles that I have found via Google and have the problem down to communications between two servers that I just cannot get to play nice. We have 3 locations on three separate islands in Hawaii. I have all three locations connected via Sonicwall Site-to-Site VPN. DNS is confirmed working. All three sites have DC present and syncronizing AD across the VPN. I have a site on Kauai that is the target server in the log files I will post and a site on Maui which is the client in the logs. I can run klist ticket on the Kauai server but when I run Klist on the Maui server, I get only the following:C:Usersadministrator.MYDOMAIN>klistCredentials cache C:Usersadministrator.MYDOMAINkrb5cc_administrator not found. When I run klist ticket, I get the following:C:Usersadministrator.MYDOMAIN>klist ticketUsage: klist [[-c] [-f] [-e] [-a [-n]]] [-k [-t] [-K]] [name]name name of credentials cache or keytab with the prefix. File-based cache or keytab’s prefix is FILE:.-c specifies that credential cache is to be listed-k specifies that key tab is to be listedoptions for credentials caches:-f shows credentials flags-e shows the encryption type-a shows addresses-n do not reverse-resolve addressesoptions for keytabs:-t shows keytab entry timestamps-K shows keytab entry key value-e shows keytab entry key typeThe Event Logs are littered with these errors:The Kerberos client received a KRB_AP_ERR_MODIFIED error from the server eskimo-server09$. The target name used was E3514235-4B06-11D1-AB04-00C04FC2DCD2/1e6f523a-ac4d-4045-a2fc-4fab4d338d6e/MYDOMAIN@MYDOMAIN This indicates that the target server failed to decrypt the ticket provided by the client. This can occur when the target server principal name (SPN) is registered on an account other than the account the target service is using. Ensure that the target SPN is only registered on the account used by the server. This error can also happen if the target service account password is different than what is configured on the Kerberos Key Distribution Center for that target service. Ensure that the service on the server and the KDC are both configured to use the same password. If the server name is not fully qualified, and the target domain (MYDOMAIN) is different from the client domain (MYDOMAIN), check if there are identically named server accounts in these two domains, or use the fully-qualified name to identify the server.From the client server on Maui I have run setspn -D E3514235-4B06-11D1-AB04-00C04FC2DCD2/1e6f523a-ac4d-4045-a2fc-4fab4d338d6e/MYDOMAIN@MYDOMAIN KauaiServer$And re-registered it with setspn -S E3514235-4B06-11D1-AB04-00C04FC2DCD2/1e6f523a-ac4d-4045-a2fc-4fab4d338d6e/MYDOMAIN@MYDOMAIN KauaiServer$ I have queried for duplicate SPN’s in the domain and there aren’t any listed. In fact, after deleting the record and querying the domain for the record, the client server reports that NO SUCH SPN Found. So I have two issues that I am trying to solve. 1) klist.exe seems to not be working on the client server2) The Error Event ID 4 on the client with the Kauai Server.Thanks for any help you can provide. Read More
My Tenant is the Victim of a Persistent Email Spoofer
Hi all, for 5 days now a specific user in my tenant has been the target of a mass email spoofing attack. This users email address has been spoofed, and now we’re absolutely flooded with “Undelivered Mail Returned to Sender” bounce back emails. The attacker is impersonating this user by editing their headers to make the email appear to be coming from us. The attacker is sending a purchase order number out trying to collect payment.
I have confirmed that the affected user’s email is not sending out anything, and that the tenant as a whole is not sending out malicious emails.
Most of these emails are being originated from the same domain: “ns1.ezginplc.co”. I have already reported this domain to the FBI, but obviously there is nothing they can really do.
On my end, being the only admin for a small 8 person company, I have added a rule to simply drop these emails from ever being delivered from this domain. Unfortunately, not every email the attacker is sending is from this domain, and some items get through and get quarantined, have to be deleted form the users inbox, or worse and they make it through and annoy the living hell out of the user.
I was hoping that this attacker would move on, but they have been at this for a week and are sending upwards of 4 thousand emails a day.
What is there that I can actually do about this? Further, why is email so easy to impersonate and commit crime with, and why isn’t a solution being developed from big tech?
Hi all, for 5 days now a specific user in my tenant has been the target of a mass email spoofing attack. This users email address has been spoofed, and now we’re absolutely flooded with “Undelivered Mail Returned to Sender” bounce back emails. The attacker is impersonating this user by editing their headers to make the email appear to be coming from us. The attacker is sending a purchase order number out trying to collect payment. I have confirmed that the affected user’s email is not sending out anything, and that the tenant as a whole is not sending out malicious emails. Most of these emails are being originated from the same domain: “ns1.ezginplc.co”. I have already reported this domain to the FBI, but obviously there is nothing they can really do. On my end, being the only admin for a small 8 person company, I have added a rule to simply drop these emails from ever being delivered from this domain. Unfortunately, not every email the attacker is sending is from this domain, and some items get through and get quarantined, have to be deleted form the users inbox, or worse and they make it through and annoy the living hell out of the user. I was hoping that this attacker would move on, but they have been at this for a week and are sending upwards of 4 thousand emails a day. What is there that I can actually do about this? Further, why is email so easy to impersonate and commit crime with, and why isn’t a solution being developed from big tech? Read More
How can I convert PDF to Word document on Mac?
I’m seeking advice on how to convert PDF files to Word documents on a Mac. As I sometimes use my Mac more often than my Windows 11 PC, I often need to edit the content of PDF documents for work but struggle to find a reliable way to convert them while preserving the formatting, such as text alignment, images, and tables. Most of the solutions I’ve tried either mess up the layout or miss some elements. Does anyone have recommendations for software or methods that work well for this on macOS? I would appreciate any tips or guidance on how to handle this efficiently. Thanks in advance!
I’m seeking advice on how to convert PDF files to Word documents on a Mac. As I sometimes use my Mac more often than my Windows 11 PC, I often need to edit the content of PDF documents for work but struggle to find a reliable way to convert them while preserving the formatting, such as text alignment, images, and tables. Most of the solutions I’ve tried either mess up the layout or miss some elements. Does anyone have recommendations for software or methods that work well for this on macOS? I would appreciate any tips or guidance on how to handle this efficiently. Thanks in advance! Read More
Conditional array accumulation inside parfor
I have a situation were I am testing a condition inside a parfor loop, and if true append the results of a computation to an array. A simplified example is as follows
ary = [];
parfor n=1:N
for m = 1:M
if (f(m,n)>0) % do some test, this is not easily vectorizable
ary = [ary; n m];
end
end
end
I would like, however, to avoid growing arrays in the loop.
I could estimate an upperbound for the size of ary and try to do it this way,
ary = zeros(ubound,2);
ind = 0;
parfor n=1:N
for m = 1:M
if (f(m,n)>0) % do some test, this is not easily vectorizable
ind = ind + 1;
ary(ind,:) = [n m]; % such indexing will not work within parfor
end
end
end
but that wouldn’t work as shown in the comment.
Another idea I had was using a logical array to keep track of the conditional result.
condary = false(N*M);
for k = 1:N*M % flatten the loop
% get n and m from k; k = (n-1)*M+m, therefore
m = mod(k,M); if m == 0, m = M; end
n = (k-m)/M+1;
if (f(m,n)>0)
condary(k) = true;
end
end
The desired array, ary, can then be back-constructed from the logical array in a second loop. In fact, ary, can be preallocated at this point. Or the operations meant to be performed using ary can be performed based on condary in a second loop. But this involves flattening the loop.
I was wondering if there are any better ways to do this.I have a situation were I am testing a condition inside a parfor loop, and if true append the results of a computation to an array. A simplified example is as follows
ary = [];
parfor n=1:N
for m = 1:M
if (f(m,n)>0) % do some test, this is not easily vectorizable
ary = [ary; n m];
end
end
end
I would like, however, to avoid growing arrays in the loop.
I could estimate an upperbound for the size of ary and try to do it this way,
ary = zeros(ubound,2);
ind = 0;
parfor n=1:N
for m = 1:M
if (f(m,n)>0) % do some test, this is not easily vectorizable
ind = ind + 1;
ary(ind,:) = [n m]; % such indexing will not work within parfor
end
end
end
but that wouldn’t work as shown in the comment.
Another idea I had was using a logical array to keep track of the conditional result.
condary = false(N*M);
for k = 1:N*M % flatten the loop
% get n and m from k; k = (n-1)*M+m, therefore
m = mod(k,M); if m == 0, m = M; end
n = (k-m)/M+1;
if (f(m,n)>0)
condary(k) = true;
end
end
The desired array, ary, can then be back-constructed from the logical array in a second loop. In fact, ary, can be preallocated at this point. Or the operations meant to be performed using ary can be performed based on condary in a second loop. But this involves flattening the loop.
I was wondering if there are any better ways to do this. I have a situation were I am testing a condition inside a parfor loop, and if true append the results of a computation to an array. A simplified example is as follows
ary = [];
parfor n=1:N
for m = 1:M
if (f(m,n)>0) % do some test, this is not easily vectorizable
ary = [ary; n m];
end
end
end
I would like, however, to avoid growing arrays in the loop.
I could estimate an upperbound for the size of ary and try to do it this way,
ary = zeros(ubound,2);
ind = 0;
parfor n=1:N
for m = 1:M
if (f(m,n)>0) % do some test, this is not easily vectorizable
ind = ind + 1;
ary(ind,:) = [n m]; % such indexing will not work within parfor
end
end
end
but that wouldn’t work as shown in the comment.
Another idea I had was using a logical array to keep track of the conditional result.
condary = false(N*M);
for k = 1:N*M % flatten the loop
% get n and m from k; k = (n-1)*M+m, therefore
m = mod(k,M); if m == 0, m = M; end
n = (k-m)/M+1;
if (f(m,n)>0)
condary(k) = true;
end
end
The desired array, ary, can then be back-constructed from the logical array in a second loop. In fact, ary, can be preallocated at this point. Or the operations meant to be performed using ary can be performed based on condary in a second loop. But this involves flattening the loop.
I was wondering if there are any better ways to do this. parfor, array, preallocation MATLAB Answers — New Questions
shift-mean pour l’image
S’il vous plaît, j’ai besoin d’un code d’algorithme Shift Mean pour la segmentation d’une image en niveaux de gris. Si quelqu’un peut m’aider, merci d’avance.S’il vous plaît, j’ai besoin d’un code d’algorithme Shift Mean pour la segmentation d’une image en niveaux de gris. Si quelqu’un peut m’aider, merci d’avance. S’il vous plaît, j’ai besoin d’un code d’algorithme Shift Mean pour la segmentation d’une image en niveaux de gris. Si quelqu’un peut m’aider, merci d’avance. shift mean, segmentation, image niveau gris MATLAB Answers — New Questions
identify faces of a 3D geometry
I have two 3D geometries composed of nodes and faces.
file_im = importdata("f_mm.mat");
nodes_e = file_im.nodes_e;
faces_e = file_im.faces_e;
g_P_sez = file_im.g_P_sez;
figure
trimesh(faces_e(:,:),nodes_e(:,1),nodes_e(:,2),nodes_e(:,3),’EdgeColor’,’k’,’Linewidth’,0.1,’Facecolor’,[255 0 0]/255,’FaceAlpha’,1)
hold on
plot3(g_P_sez(:,1),g_P_sez(:,2),g_P_sez(:,3),’k.’,’Markersize’,15)
hold off
axis equal
xlabel(‘x’)
ylabel(‘y’)
zlabel(‘z’)
I want to locate the faces of this geometry (yellow box) that are contained in ‘faces_e’.
Of help I have the node ‘g_P_sez’. So could select the faces at a distance X from that node.
There would be the nearestFace function but it is not suitable for my case. Are there alternatives?I have two 3D geometries composed of nodes and faces.
file_im = importdata("f_mm.mat");
nodes_e = file_im.nodes_e;
faces_e = file_im.faces_e;
g_P_sez = file_im.g_P_sez;
figure
trimesh(faces_e(:,:),nodes_e(:,1),nodes_e(:,2),nodes_e(:,3),’EdgeColor’,’k’,’Linewidth’,0.1,’Facecolor’,[255 0 0]/255,’FaceAlpha’,1)
hold on
plot3(g_P_sez(:,1),g_P_sez(:,2),g_P_sez(:,3),’k.’,’Markersize’,15)
hold off
axis equal
xlabel(‘x’)
ylabel(‘y’)
zlabel(‘z’)
I want to locate the faces of this geometry (yellow box) that are contained in ‘faces_e’.
Of help I have the node ‘g_P_sez’. So could select the faces at a distance X from that node.
There would be the nearestFace function but it is not suitable for my case. Are there alternatives? I have two 3D geometries composed of nodes and faces.
file_im = importdata("f_mm.mat");
nodes_e = file_im.nodes_e;
faces_e = file_im.faces_e;
g_P_sez = file_im.g_P_sez;
figure
trimesh(faces_e(:,:),nodes_e(:,1),nodes_e(:,2),nodes_e(:,3),’EdgeColor’,’k’,’Linewidth’,0.1,’Facecolor’,[255 0 0]/255,’FaceAlpha’,1)
hold on
plot3(g_P_sez(:,1),g_P_sez(:,2),g_P_sez(:,3),’k.’,’Markersize’,15)
hold off
axis equal
xlabel(‘x’)
ylabel(‘y’)
zlabel(‘z’)
I want to locate the faces of this geometry (yellow box) that are contained in ‘faces_e’.
Of help I have the node ‘g_P_sez’. So could select the faces at a distance X from that node.
There would be the nearestFace function but it is not suitable for my case. Are there alternatives? faces, geometry, 3d, 3d plots, select MATLAB Answers — New Questions
Physics-informed NN for parameter identification
Dear all,
I am trying to use the physics-informed neural network (PINN) for an inverse parameter identification for ODE or PDE.
I referenced the example in this link to write the code:https://ww2.mathworks.cn/matlabcentral/answers/2019216-physical-informed-neural-network-identify-coefficient-of-loss-function#answer_1312867
Here’s the program I wrote:
clear; clc;
% Specify training configuration
numEpochs = 500000;
avgG = [];
avgSqG = [];
batchSize = 500;
lossFcn = @modelLoss;
lr = 1e-5;
% Inverse PINN for d2x/dt2 = mu1*x + mu2*x^2
mu1Actual = -rand;
mu2Actual = rand;
x = @(t) cos(sqrt(-mu1Actual)*t) + sin(sqrt(-mu2Actual)*t);
maxT = 2*pi/sqrt(max(-mu1Actual, -mu2Actual));
t = dlarray(linspace(0, maxT, batchSize), "CB");
xactual = dlarray(x(t), "CB");
% Specify a network and initial guesses for mu1 and mu2
net = [
featureInputLayer(1)
fullyConnectedLayer(100)
tanhLayer
fullyConnectedLayer(100)
tanhLayer
fullyConnectedLayer(1)];
params.net = dlnetwork(net);
params.mu1 = dlarray(-0.5);
params.mu2 = dlarray(0.5);
% Train
for i = 1:numEpochs
[loss, grad] = dlfeval(lossFcn, t, xactual, params);
[params, avgG, avgSqG] = adamupdate(params, grad, avgG, avgSqG, i, lr);
if mod(i, 1000) == 0
fprintf("Epoch: %d, Predicted mu1: %.3f, Actual mu1: %.3f, Predicted mu2: %.3f, Actual mu2: %.3fn", …
i, extractdata(params.mu1), mu1Actual, extractdata(params.mu2), mu2Actual);
end
end
function [loss, grad] = modelLoss(t, x, params)
xpred = forward(params.net, t);
dxdt = dlgradient(sum(real(xpred)), t, ‘EnableHigherDerivatives’, true);
d2xdt2 = dlgradient(sum(dxdt), t);
% Modify the ODE residual based on your specific ODE
odeResidual = d2xdt2 – (params.mu1 * xpred + params.mu2 * xpred.^2);
% Compute the mean square error of the ODE residual
odeLoss = mean(odeResidual.^2);
% Compute the L2 difference between the predicted xpred and the true x.
dataLoss = l2loss(real(x), real(xpred)); % Ensure real part is used
% Sum the losses and take gradients
loss = odeLoss + dataLoss;
[grad.net, grad.mu1, grad.mu2] = dlgradient(loss, params.net.Learnables, params.mu1, params.mu2);
end
When I run the script no errors are reported, but the two parameters learned are not getting closer to the true values as the number of iterations increases:
I would like to know the reason for this situation and the corresponding solution, if you can help me to change the code I will be very grateful!Dear all,
I am trying to use the physics-informed neural network (PINN) for an inverse parameter identification for ODE or PDE.
I referenced the example in this link to write the code:https://ww2.mathworks.cn/matlabcentral/answers/2019216-physical-informed-neural-network-identify-coefficient-of-loss-function#answer_1312867
Here’s the program I wrote:
clear; clc;
% Specify training configuration
numEpochs = 500000;
avgG = [];
avgSqG = [];
batchSize = 500;
lossFcn = @modelLoss;
lr = 1e-5;
% Inverse PINN for d2x/dt2 = mu1*x + mu2*x^2
mu1Actual = -rand;
mu2Actual = rand;
x = @(t) cos(sqrt(-mu1Actual)*t) + sin(sqrt(-mu2Actual)*t);
maxT = 2*pi/sqrt(max(-mu1Actual, -mu2Actual));
t = dlarray(linspace(0, maxT, batchSize), "CB");
xactual = dlarray(x(t), "CB");
% Specify a network and initial guesses for mu1 and mu2
net = [
featureInputLayer(1)
fullyConnectedLayer(100)
tanhLayer
fullyConnectedLayer(100)
tanhLayer
fullyConnectedLayer(1)];
params.net = dlnetwork(net);
params.mu1 = dlarray(-0.5);
params.mu2 = dlarray(0.5);
% Train
for i = 1:numEpochs
[loss, grad] = dlfeval(lossFcn, t, xactual, params);
[params, avgG, avgSqG] = adamupdate(params, grad, avgG, avgSqG, i, lr);
if mod(i, 1000) == 0
fprintf("Epoch: %d, Predicted mu1: %.3f, Actual mu1: %.3f, Predicted mu2: %.3f, Actual mu2: %.3fn", …
i, extractdata(params.mu1), mu1Actual, extractdata(params.mu2), mu2Actual);
end
end
function [loss, grad] = modelLoss(t, x, params)
xpred = forward(params.net, t);
dxdt = dlgradient(sum(real(xpred)), t, ‘EnableHigherDerivatives’, true);
d2xdt2 = dlgradient(sum(dxdt), t);
% Modify the ODE residual based on your specific ODE
odeResidual = d2xdt2 – (params.mu1 * xpred + params.mu2 * xpred.^2);
% Compute the mean square error of the ODE residual
odeLoss = mean(odeResidual.^2);
% Compute the L2 difference between the predicted xpred and the true x.
dataLoss = l2loss(real(x), real(xpred)); % Ensure real part is used
% Sum the losses and take gradients
loss = odeLoss + dataLoss;
[grad.net, grad.mu1, grad.mu2] = dlgradient(loss, params.net.Learnables, params.mu1, params.mu2);
end
When I run the script no errors are reported, but the two parameters learned are not getting closer to the true values as the number of iterations increases:
I would like to know the reason for this situation and the corresponding solution, if you can help me to change the code I will be very grateful! Dear all,
I am trying to use the physics-informed neural network (PINN) for an inverse parameter identification for ODE or PDE.
I referenced the example in this link to write the code:https://ww2.mathworks.cn/matlabcentral/answers/2019216-physical-informed-neural-network-identify-coefficient-of-loss-function#answer_1312867
Here’s the program I wrote:
clear; clc;
% Specify training configuration
numEpochs = 500000;
avgG = [];
avgSqG = [];
batchSize = 500;
lossFcn = @modelLoss;
lr = 1e-5;
% Inverse PINN for d2x/dt2 = mu1*x + mu2*x^2
mu1Actual = -rand;
mu2Actual = rand;
x = @(t) cos(sqrt(-mu1Actual)*t) + sin(sqrt(-mu2Actual)*t);
maxT = 2*pi/sqrt(max(-mu1Actual, -mu2Actual));
t = dlarray(linspace(0, maxT, batchSize), "CB");
xactual = dlarray(x(t), "CB");
% Specify a network and initial guesses for mu1 and mu2
net = [
featureInputLayer(1)
fullyConnectedLayer(100)
tanhLayer
fullyConnectedLayer(100)
tanhLayer
fullyConnectedLayer(1)];
params.net = dlnetwork(net);
params.mu1 = dlarray(-0.5);
params.mu2 = dlarray(0.5);
% Train
for i = 1:numEpochs
[loss, grad] = dlfeval(lossFcn, t, xactual, params);
[params, avgG, avgSqG] = adamupdate(params, grad, avgG, avgSqG, i, lr);
if mod(i, 1000) == 0
fprintf("Epoch: %d, Predicted mu1: %.3f, Actual mu1: %.3f, Predicted mu2: %.3f, Actual mu2: %.3fn", …
i, extractdata(params.mu1), mu1Actual, extractdata(params.mu2), mu2Actual);
end
end
function [loss, grad] = modelLoss(t, x, params)
xpred = forward(params.net, t);
dxdt = dlgradient(sum(real(xpred)), t, ‘EnableHigherDerivatives’, true);
d2xdt2 = dlgradient(sum(dxdt), t);
% Modify the ODE residual based on your specific ODE
odeResidual = d2xdt2 – (params.mu1 * xpred + params.mu2 * xpred.^2);
% Compute the mean square error of the ODE residual
odeLoss = mean(odeResidual.^2);
% Compute the L2 difference between the predicted xpred and the true x.
dataLoss = l2loss(real(x), real(xpred)); % Ensure real part is used
% Sum the losses and take gradients
loss = odeLoss + dataLoss;
[grad.net, grad.mu1, grad.mu2] = dlgradient(loss, params.net.Learnables, params.mu1, params.mu2);
end
When I run the script no errors are reported, but the two parameters learned are not getting closer to the true values as the number of iterations increases:
I would like to know the reason for this situation and the corresponding solution, if you can help me to change the code I will be very grateful! deep learning, pinn, physics-informed nn MATLAB Answers — New Questions
Why Does dcm2angle Work Like This?
Suppose I have a direction cosine matrix, brought to my attention by a colleague
C = round(angle2dcm(-pi/2,-pi/2,0,’ZYX’))
Extract the angles with @doc:dcm2angle (Aerospace Toolbox) using the Default option
[a1,a2,a3] = dcm2angle(C,’ZYX’,’Default’);[a1,a2,a3]
Because the middle angle is -pi/2, the extracted angle triplets have multiple solutions, but the default result isn’t one of them.
Sometime after R2019b and before or at R2022a, an additonal optional argument can be specified, though I could find nothing about this new argument in the release notes nor the bug fixes.
[a1,a2,a3] = dcm2angle(C,’ZYX’,’Robust’);[a1,a2,a3]
Now we get a correct answer.
Trying with @doc:rotm2eul that’s used in other toolboxes (Robotics, Navigation, UAV) we see that it returns a correct result without any optional arguments.
eul = rotm2eul(C.’,’ZYX’)
round(angle2dcm(eul(1),eul(2),eul(3),’ZYX’))
@doc:dcm2angle with the Robust option actually computes two sets of angles, then computes the DCM with each set, and then compares the recomputed DCMs to the input DCM, and then returns the set of angles that result in a DCM that’s closest to the input. @doc:rotm2eul uses a different approach altogether, though is limited to only three axes sequences.
To be sure, the Default option with @doc:dcm2angle is considerably faster than Robust, but Robust appears to take the same amout of time as @doc:rotm2eul
timeit(@() dcm2angle(repmat(C,1,1,1e5),’ZYX’,’Default’),3)
timeit(@() dcm2angle(repmat(C,1,1,1e5),’ZYX’,’Robust’),3)
timeit(@() rotm2eul(repmat(C.’,1,1,1e5),’ZYX’),1)
Does anyone have a thought as to why dcm2angle is implemented as it is with Default and forces the user to use Robust? And why wouldn’t that same reason apply to rotm2eul?
Once MathWorks realized that dcm2angle Default was returning incorrect results in some cases, why patch it with Robust and keep Default instead of just fixing the bug?Suppose I have a direction cosine matrix, brought to my attention by a colleague
C = round(angle2dcm(-pi/2,-pi/2,0,’ZYX’))
Extract the angles with @doc:dcm2angle (Aerospace Toolbox) using the Default option
[a1,a2,a3] = dcm2angle(C,’ZYX’,’Default’);[a1,a2,a3]
Because the middle angle is -pi/2, the extracted angle triplets have multiple solutions, but the default result isn’t one of them.
Sometime after R2019b and before or at R2022a, an additonal optional argument can be specified, though I could find nothing about this new argument in the release notes nor the bug fixes.
[a1,a2,a3] = dcm2angle(C,’ZYX’,’Robust’);[a1,a2,a3]
Now we get a correct answer.
Trying with @doc:rotm2eul that’s used in other toolboxes (Robotics, Navigation, UAV) we see that it returns a correct result without any optional arguments.
eul = rotm2eul(C.’,’ZYX’)
round(angle2dcm(eul(1),eul(2),eul(3),’ZYX’))
@doc:dcm2angle with the Robust option actually computes two sets of angles, then computes the DCM with each set, and then compares the recomputed DCMs to the input DCM, and then returns the set of angles that result in a DCM that’s closest to the input. @doc:rotm2eul uses a different approach altogether, though is limited to only three axes sequences.
To be sure, the Default option with @doc:dcm2angle is considerably faster than Robust, but Robust appears to take the same amout of time as @doc:rotm2eul
timeit(@() dcm2angle(repmat(C,1,1,1e5),’ZYX’,’Default’),3)
timeit(@() dcm2angle(repmat(C,1,1,1e5),’ZYX’,’Robust’),3)
timeit(@() rotm2eul(repmat(C.’,1,1,1e5),’ZYX’),1)
Does anyone have a thought as to why dcm2angle is implemented as it is with Default and forces the user to use Robust? And why wouldn’t that same reason apply to rotm2eul?
Once MathWorks realized that dcm2angle Default was returning incorrect results in some cases, why patch it with Robust and keep Default instead of just fixing the bug? Suppose I have a direction cosine matrix, brought to my attention by a colleague
C = round(angle2dcm(-pi/2,-pi/2,0,’ZYX’))
Extract the angles with @doc:dcm2angle (Aerospace Toolbox) using the Default option
[a1,a2,a3] = dcm2angle(C,’ZYX’,’Default’);[a1,a2,a3]
Because the middle angle is -pi/2, the extracted angle triplets have multiple solutions, but the default result isn’t one of them.
Sometime after R2019b and before or at R2022a, an additonal optional argument can be specified, though I could find nothing about this new argument in the release notes nor the bug fixes.
[a1,a2,a3] = dcm2angle(C,’ZYX’,’Robust’);[a1,a2,a3]
Now we get a correct answer.
Trying with @doc:rotm2eul that’s used in other toolboxes (Robotics, Navigation, UAV) we see that it returns a correct result without any optional arguments.
eul = rotm2eul(C.’,’ZYX’)
round(angle2dcm(eul(1),eul(2),eul(3),’ZYX’))
@doc:dcm2angle with the Robust option actually computes two sets of angles, then computes the DCM with each set, and then compares the recomputed DCMs to the input DCM, and then returns the set of angles that result in a DCM that’s closest to the input. @doc:rotm2eul uses a different approach altogether, though is limited to only three axes sequences.
To be sure, the Default option with @doc:dcm2angle is considerably faster than Robust, but Robust appears to take the same amout of time as @doc:rotm2eul
timeit(@() dcm2angle(repmat(C,1,1,1e5),’ZYX’,’Default’),3)
timeit(@() dcm2angle(repmat(C,1,1,1e5),’ZYX’,’Robust’),3)
timeit(@() rotm2eul(repmat(C.’,1,1,1e5),’ZYX’),1)
Does anyone have a thought as to why dcm2angle is implemented as it is with Default and forces the user to use Robust? And why wouldn’t that same reason apply to rotm2eul?
Once MathWorks realized that dcm2angle Default was returning incorrect results in some cases, why patch it with Robust and keep Default instead of just fixing the bug? dcm2angle, rotm2eul MATLAB Answers — New Questions
How do I download .csv dataset directly from Kaggle with Matlab code.
Hello, I found a dataset on Kaggle which I want to use for my Machine learning project. However, I’m required to download the dataset from the code itself. I tried this:
url1 = ‘https://www.kaggle.com/competitions/mrs-spring-2023-battery-prediction-challenge/data?select=example_submission.csv’;
url2 = ‘https://www.kaggle.com/competitions/mrs-spring-2023-battery-prediction-challenge/data?select=test_data.csv’;
url3 = ‘https://www.kaggle.com/competitions/mrs-spring-2023-battery-prediction-challenge/data?select=training_data.csv’;
example = websave(‘example_submission.csv’,url1);
test = websave(‘test_data.csv’,url2);
training = websave(‘training_data.csv’,url3);
data_example = readtable("example_submission.csv");
data_test = readtable("test_data.csv");
data_train = readtable("training_data.csv");
I was able to download them, however instead of downloading the .csv files, it is downloading an HTML page that contains the Kaggle website.Hello, I found a dataset on Kaggle which I want to use for my Machine learning project. However, I’m required to download the dataset from the code itself. I tried this:
url1 = ‘https://www.kaggle.com/competitions/mrs-spring-2023-battery-prediction-challenge/data?select=example_submission.csv’;
url2 = ‘https://www.kaggle.com/competitions/mrs-spring-2023-battery-prediction-challenge/data?select=test_data.csv’;
url3 = ‘https://www.kaggle.com/competitions/mrs-spring-2023-battery-prediction-challenge/data?select=training_data.csv’;
example = websave(‘example_submission.csv’,url1);
test = websave(‘test_data.csv’,url2);
training = websave(‘training_data.csv’,url3);
data_example = readtable("example_submission.csv");
data_test = readtable("test_data.csv");
data_train = readtable("training_data.csv");
I was able to download them, however instead of downloading the .csv files, it is downloading an HTML page that contains the Kaggle website. Hello, I found a dataset on Kaggle which I want to use for my Machine learning project. However, I’m required to download the dataset from the code itself. I tried this:
url1 = ‘https://www.kaggle.com/competitions/mrs-spring-2023-battery-prediction-challenge/data?select=example_submission.csv’;
url2 = ‘https://www.kaggle.com/competitions/mrs-spring-2023-battery-prediction-challenge/data?select=test_data.csv’;
url3 = ‘https://www.kaggle.com/competitions/mrs-spring-2023-battery-prediction-challenge/data?select=training_data.csv’;
example = websave(‘example_submission.csv’,url1);
test = websave(‘test_data.csv’,url2);
training = websave(‘training_data.csv’,url3);
data_example = readtable("example_submission.csv");
data_test = readtable("test_data.csv");
data_train = readtable("training_data.csv");
I was able to download them, however instead of downloading the .csv files, it is downloading an HTML page that contains the Kaggle website. import, database, help MATLAB Answers — New Questions
Recuperar email
Meu email foi rackeado e hoje tento entrar e eswuecer a senha diz que meu email nao existe, uso esse email a anos preciso recuperar algume me ajuda
email address removed for privacy reasons
Meu email foi rackeado e hoje tento entrar e eswuecer a senha diz que meu email nao existe, uso esse email a anos preciso recuperar algume me ajudaemail address removed for privacy reasons Read More
The new version of edge smil is invalid for the fePointLight attributes x and y, but z is valid.
The new version of edge smil is invalid for the fePointLight attributes x and y, but z is valid. Everything is normal in version 1518.
The new version of edge smil is invalid for the fePointLight attributes x and y, but z is valid. Everything is normal in version 1518. Read More
Too much to ask?!
Help me simply to Leave oneDrive alone, making the only way to update the cloud is it manually do it.
***PROBLEM***
Stopped the start-up, and I have the “leave file file on computer” but when I organize, oneDrive, from the taskbar, asks the ridiculously ambiguous message: “keep files in folder or delete” (recycling bin). I send it to recycling bin just to take it back out again. I just want my files to be left alone, now. I want it to stop asking me questions about things I’ve uploaded and moved.
Also, is it me, or do I have to log into Windows 3 times in the span of 5 minutes just to create this post. I wish that’ll sync as much as oneDrive.
Help me simply to Leave oneDrive alone, making the only way to update the cloud is it manually do it. ***PROBLEM***Stopped the start-up, and I have the “leave file file on computer” but when I organize, oneDrive, from the taskbar, asks the ridiculously ambiguous message: “keep files in folder or delete” (recycling bin). I send it to recycling bin just to take it back out again. I just want my files to be left alone, now. I want it to stop asking me questions about things I’ve uploaded and moved. Also, is it me, or do I have to log into Windows 3 times in the span of 5 minutes just to create this post. I wish that’ll sync as much as oneDrive. Read More
windows explorer performance issues with large files: need help!
I’m experiencing significant performence issues with windows explorer when accessing folders that contain large files. The folder takes a long time to load details of files, and the “Calcul des filtres…” message appears for an extended period, making it difficult to manage my files efficiently.
I’ve already tried several solutions, such as disabling thumbails, optimizing the folder for general items, and increasing virtual memory, but the problem persists. I’m attaching a screenshot that shows the issue in detail. I also tried some thrid-party file manager like total commander, directory opus and xyplorer; but apparently all of them did not even have the feature to disply the detail of files as the windows explorer do as shown in the screenshot attached.
Does anyone have any suggestions or advanced troubleshooting steps that could help resolve this problem? your assistance would be greatly appreciate!
P.S:
Nom de l’appareil DESKTOP-S1OLLOC
Processeur Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz 2.50 GHz
Mémoire RAM installée 8,00 Go (7,89 Go utilisable)
ID de périphérique 7188AD74-922E-46CE-ABCB-C1E9E343DC37
ID de produit 00331-20090-00000-AA371
Type du système Système d’exploitation 64 bits, processeur x64
Stylet et fonction tactile La fonctionnalité d’entrée tactile ou avec un stylet n’est pas disponible sur cet écran
Édition Windows 10 Professionnel
Version 22H2
Installé le 13/05/2023
Build du système d’exploitation 19045.2965
Expérience Windows Feature Experience Pack 1000.19041.1000.0
I’m experiencing significant performence issues with windows explorer when accessing folders that contain large files. The folder takes a long time to load details of files, and the “Calcul des filtres…” message appears for an extended period, making it difficult to manage my files efficiently.I’ve already tried several solutions, such as disabling thumbails, optimizing the folder for general items, and increasing virtual memory, but the problem persists. I’m attaching a screenshot that shows the issue in detail. I also tried some thrid-party file manager like total commander, directory opus and xyplorer; but apparently all of them did not even have the feature to disply the detail of files as the windows explorer do as shown in the screenshot attached.Does anyone have any suggestions or advanced troubleshooting steps that could help resolve this problem? your assistance would be greatly appreciate!P.S:Nom de l’appareil DESKTOP-S1OLLOCProcesseur Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz 2.50 GHzMémoire RAM installée 8,00 Go (7,89 Go utilisable)ID de périphérique 7188AD74-922E-46CE-ABCB-C1E9E343DC37ID de produit 00331-20090-00000-AA371Type du système Système d’exploitation 64 bits, processeur x64Stylet et fonction tactile La fonctionnalité d’entrée tactile ou avec un stylet n’est pas disponible sur cet écranÉdition Windows 10 ProfessionnelVersion 22H2Installé le 13/05/2023Build du système d’exploitation 19045.2965Expérience Windows Feature Experience Pack 1000.19041.1000.0 Read More
Adding the senders From address to a Global Disclaimer or similar header or footer for External Emai
I have no problem adding a global text disclaimer for external emails. Since the Reply To and the Mail From are very often inconsistent with Spam and Phishing emails I would like to include the From address so users can compare that address with the visible Reply address. Especially for the clearly wrong domains frequently listed for the stated sender. Is there a way to do this in Exchange 365?
CoPilot provided this Powershell as an answer:
New-TransportRule -Name “Add Sender Email to FooterMicrosoft 365 admin center” -FromScope “NotInOrganization” -ApplyHtmlDisclaimerText “This email is from an external sender (%%SenderAddress%%). Please verify its authenticity.” -ApplyHtmlDisclaimerFallbackAction “Wrap” -Mode Enforce
This results in the error below with and without the () around the variable:
Write-ErrorMessage : |System.ArgumentException|The disclaimer text contains an invalid macro name: ‘SenderAddress’.
I have had this function in 3rd Party spam blocking systems. It seems like something that could be done natively in Exchange 365. Thank you for your time in looking at my question.
I have no problem adding a global text disclaimer for external emails. Since the Reply To and the Mail From are very often inconsistent with Spam and Phishing emails I would like to include the From address so users can compare that address with the visible Reply address. Especially for the clearly wrong domains frequently listed for the stated sender. Is there a way to do this in Exchange 365? CoPilot provided this Powershell as an answer: New-TransportRule -Name “Add Sender Email to FooterMicrosoft 365 admin center” -FromScope “NotInOrganization” -ApplyHtmlDisclaimerText “This email is from an external sender (%%SenderAddress%%). Please verify its authenticity.” -ApplyHtmlDisclaimerFallbackAction “Wrap” -Mode EnforceThis results in the error below with and without the () around the variable:Write-ErrorMessage : |System.ArgumentException|The disclaimer text contains an invalid macro name: ‘SenderAddress’.I have had this function in 3rd Party spam blocking systems. It seems like something that could be done natively in Exchange 365. Thank you for your time in looking at my question. Read More
Use fixed colormap or colorbar scale for series of 3D bar graphs in video animation
I’ve been able to incorporate code from this answer:
https://www.mathworks.com/matlabcentral/answers/98236-how-can-i-color-bars-to-correspond-to-their-heights-when-using-bar3
…in order to set uniform colors to bars in bar3() plots based on height. I would like the color scale to be fixed (10=burgendy, 0=navy) throughout all plots; however, it seems to be relative based on the max/min of each one. I tried setting c.TicksLimit=[0 10] but that didn’t work. It’s quite possible there’s an entirely better/different approach for this 3D visualization. I am open to a changeup but also would appreciate the opportunity to better undestand bar3() and figure properties. Thank you for your time and assistance.
Here’s the current animation produced from the code below to help visualize. Ideally, the initial condition would be all burgendy bars, and the colorbar would be fixed all through the animation from 0 to 10.
function animator(frames)
filename = ‘animation.mp4’;
v=VideoWriter(filename,’MPEG-4′);
v.FrameRate=2;
open(v);
for i1=1:length(frames)
active=frames(:,:,i1);
b=bar3(active);
colormap(turbo(10)); %% Perhaps something ‘smart’ happens here instead of fixed turbo(10)
% to set the colormap based on relative max/min?
set(gca,’ZLim’,[0 10]);
% Copied from above link and properly colors all bars to same color
% based on height
numBars=size(active,1);
numSets=size(active,2);
for i2=1:numSets
zdata=ones(6*numBars,4);
k=1;
for j=0:6:(6*numBars-6)
zdata(j+1:j+6,:)=active(k,i2);
k=k+1;
end
set(b(i2),’Cdata’,zdata)
end
c=colorbar;
c.Ticks=0:10;
% Or maybe something happens here to fix the colorbar scale?
exportgraphics(gca,’temp.png’);
im=imread(‘temp.png’);
im=imresize(im,[560 730]);
writeVideo(v,im);
end
endI’ve been able to incorporate code from this answer:
https://www.mathworks.com/matlabcentral/answers/98236-how-can-i-color-bars-to-correspond-to-their-heights-when-using-bar3
…in order to set uniform colors to bars in bar3() plots based on height. I would like the color scale to be fixed (10=burgendy, 0=navy) throughout all plots; however, it seems to be relative based on the max/min of each one. I tried setting c.TicksLimit=[0 10] but that didn’t work. It’s quite possible there’s an entirely better/different approach for this 3D visualization. I am open to a changeup but also would appreciate the opportunity to better undestand bar3() and figure properties. Thank you for your time and assistance.
Here’s the current animation produced from the code below to help visualize. Ideally, the initial condition would be all burgendy bars, and the colorbar would be fixed all through the animation from 0 to 10.
function animator(frames)
filename = ‘animation.mp4’;
v=VideoWriter(filename,’MPEG-4′);
v.FrameRate=2;
open(v);
for i1=1:length(frames)
active=frames(:,:,i1);
b=bar3(active);
colormap(turbo(10)); %% Perhaps something ‘smart’ happens here instead of fixed turbo(10)
% to set the colormap based on relative max/min?
set(gca,’ZLim’,[0 10]);
% Copied from above link and properly colors all bars to same color
% based on height
numBars=size(active,1);
numSets=size(active,2);
for i2=1:numSets
zdata=ones(6*numBars,4);
k=1;
for j=0:6:(6*numBars-6)
zdata(j+1:j+6,:)=active(k,i2);
k=k+1;
end
set(b(i2),’Cdata’,zdata)
end
c=colorbar;
c.Ticks=0:10;
% Or maybe something happens here to fix the colorbar scale?
exportgraphics(gca,’temp.png’);
im=imread(‘temp.png’);
im=imresize(im,[560 730]);
writeVideo(v,im);
end
end I’ve been able to incorporate code from this answer:
https://www.mathworks.com/matlabcentral/answers/98236-how-can-i-color-bars-to-correspond-to-their-heights-when-using-bar3
…in order to set uniform colors to bars in bar3() plots based on height. I would like the color scale to be fixed (10=burgendy, 0=navy) throughout all plots; however, it seems to be relative based on the max/min of each one. I tried setting c.TicksLimit=[0 10] but that didn’t work. It’s quite possible there’s an entirely better/different approach for this 3D visualization. I am open to a changeup but also would appreciate the opportunity to better undestand bar3() and figure properties. Thank you for your time and assistance.
Here’s the current animation produced from the code below to help visualize. Ideally, the initial condition would be all burgendy bars, and the colorbar would be fixed all through the animation from 0 to 10.
function animator(frames)
filename = ‘animation.mp4’;
v=VideoWriter(filename,’MPEG-4′);
v.FrameRate=2;
open(v);
for i1=1:length(frames)
active=frames(:,:,i1);
b=bar3(active);
colormap(turbo(10)); %% Perhaps something ‘smart’ happens here instead of fixed turbo(10)
% to set the colormap based on relative max/min?
set(gca,’ZLim’,[0 10]);
% Copied from above link and properly colors all bars to same color
% based on height
numBars=size(active,1);
numSets=size(active,2);
for i2=1:numSets
zdata=ones(6*numBars,4);
k=1;
for j=0:6:(6*numBars-6)
zdata(j+1:j+6,:)=active(k,i2);
k=k+1;
end
set(b(i2),’Cdata’,zdata)
end
c=colorbar;
c.Ticks=0:10;
% Or maybe something happens here to fix the colorbar scale?
exportgraphics(gca,’temp.png’);
im=imread(‘temp.png’);
im=imresize(im,[560 730]);
writeVideo(v,im);
end
end 3d plots, colormap MATLAB Answers — New Questions
Help with a Formula
I’m trying to input deductions for a length according to which heading style and which track we will be using. Line 4 is trying to do the calculations accordingly as the track is column L – King Track, the heading is column B – Double Pinch Pleat and it is Face Fit.
The length is in this instance 2300. The deductions for Face Fix is 0, so the outcome should be 2300.
Screen Shot attached with the static data and the required allowances for each scenario.
I’m not sure if this is possible as there seems to be a lot of values required.
Thank you in advance. I do hope for an answer.
I’m trying to input deductions for a length according to which heading style and which track we will be using. Line 4 is trying to do the calculations accordingly as the track is column L – King Track, the heading is column B – Double Pinch Pleat and it is Face Fit.The length is in this instance 2300. The deductions for Face Fix is 0, so the outcome should be 2300.Screen Shot attached with the static data and the required allowances for each scenario.I’m not sure if this is possible as there seems to be a lot of values required. Thank you in advance. I do hope for an answer. Read More